Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AbstractElement

Hierarchy

Implements

Index

Constructors

constructor

  • new AbstractElement(model: AbstractModel, structureTypeName: string, id: string, isPartial: boolean, container: structures.aliases.IContainer | null): AbstractElement

Properties

container

container: structures.aliases.Container

id

id: string

isLoaded

isLoaded: boolean

Checks whether all properties are available at the moment

  • if false, a load is required to access these properties.

model

structureTypeName

structureTypeName: string

unit

Methods

allProperties

asLoaded

  • asLoaded()
  • Transforms a IElement interface into a Element class, loading the containing unit if necessary. (Those are technically already the same, but this function makes sure its properties are available.)

    • If invoked without callback, it checks whether the properties are available or it will throw;
    • If invoked with callback, it will load the data from the server if needed, and then invoke the callback.

delete

  • delete(): void
  • Deletes this element from the model.

    Returns void

findElementById

  • Given an element id, returns the element in this abstract element with that id, otherwise null.

    Parameters

    • id: string

    Returns AbstractElement | null

Protected getContainerAs

  • getContainerAs<T>(containerType: any): T

load

  • load(callback: function, forceRefresh?: boolean): void
  • load(forceRefresh?: boolean): Promise
  • Transforms a IElement interface into a Element class, loading the containing unit if necessary. (Those are technically already the same, but this function makes sure its properties are available.)

    • If invoked without callback, it checks whether the properties are available or it will throw;
    • If invoked with callback, it will load the data from the server if needed, and then invoke the callback.

    Parameters

    • callback: function
        • (elem: ): void
        • Parameters

          • elem:

          Returns void

    • Optional forceRefresh: boolean

    Returns void

  • Parameters

    • Optional forceRefresh: boolean

    Returns Promise

loadedProperties

publicProperties

toJSON

traverse

  • traverse(visit: function): void

traverseFind

  • traverseFind<T>(visit: function): T | null

traversePublicParts

  • traversePublicParts(visit: function): void

Generated using TypeDoc