Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AbstractProperty<T, P>

Abstract base wrapper for property values/settings. All values/settings of ModelElement-s are wrapped in the appropriate way. This is particularly important for reference values which require additional magic.

Type parameters

  • T

  • P

Hierarchy

Index

Constructors

  • parent is the structure that the value of this property attaches to, so e.g. for all values item of Part(List)Property we (should) have the invariant: item.container === this.parent.

    initialValue is default value except parts and GUID-typed primitives. (by-id/name references do not have default values.)

    Type parameters

    • T

    • P

    Parameters

    Returns AbstractProperty<T, P>

Properties

_skipOnChange: boolean = false
internal
declaredOn: IStructureClass
disposer: undefined | (() => void)
isAvailable: boolean = false
isPublic: boolean = false
isRequired: boolean = false
name: string
observableValue: P

Accessors

  • get versionInfo(): PropertyVersionInfo
  • Returns PropertyVersionInfo

Methods

  • _toJSON(): any
  • internal

    Returns any

  • assertReadable(): void
  • internal

    Returns void

  • assertWritable(): void
  • internal

    Returns void

  • dispose(): void
  • Returns void

  • get(): T
  • Returns T

  • initialize(value: T, ...moreConstructorArgs: any[]): IInitializeResult<P>
  • Initialize should return something that is observable. The property will observe this internal structure and make sure changes are pushed to the server whenever needed, in its onChange event.

    internal

    Parameters

    • value: T
    • Rest ...moreConstructorArgs: any[]

    Returns IInitializeResult<P>

  • reportAvailabilityIssues(): void
  • Returns void

  • shouldHandleChange(): boolean
  • internal

    Returns boolean

  • updateWithRawValue(value: any): void
  • Parameters

    • value: any

    Returns void

Generated using TypeDoc