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

constructor

  • new AbstractProperty(declaredOn: any, parent: Structure, name: string, initialValue: T, ...moreArgs: any[]): AbstractProperty
  • 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.)

    Parameters

    • declaredOn: any
    • parent: Structure
    • name: string
    • initialValue: T
    • Rest ...moreArgs: any[]

    Returns AbstractProperty

Properties

declaredOn

declaredOn: any

handle

handle: function

Type declaration

    • (): void
    • Returns void

isAvailable

isAvailable: boolean

Returns true if this property is not deleted, and already availabe in the current model version

isPublic

isPublic: boolean

isRequired

isRequired: boolean

name

name: string

observableValue

observableValue: P

parent

parent: Structure

versionInfo

versionInfo: PropertyVersionInfo

Methods

assertPropertyAvailableInCurrentVersion

  • assertPropertyAvailableInCurrentVersion(): void
  • Returns void

assertReadable

  • assertReadable(): void
  • Returns void

assertWritable

  • assertWritable(): void
  • Returns void

deepCopyInto

dispose

  • dispose(): void
  • Returns void

fireOnChange

  • fireOnChange(): void
  • Returns void

get

  • get(): T
  • Returns T

initialize

  • initialize(value: T, ...moreConstructorArgs: any[]): 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.

    Parameters

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

    Returns P

onChange

  • onChange(...args: any[]): void
  • Parameters

    • Rest ...args: any[]

    Returns void

resolveReferences

  • resolveReferences(): void
  • Returns void

set

  • set(newValue: T): void
  • Parameters

    • newValue: T

    Returns void

updateWithRawValue

  • updateWithRawValue(value: any): void
  • Parameters

    • value: any

    Returns void

Generated using TypeDoc