Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AbstractModel

Abstract: this class should never be instantiated. Implementation of IModel.

Hierarchy

  • AbstractModel

Implements

Index

Constructors

constructor

Properties

metaModelVersion

metaModelVersion: Version

mxVersionForModel

mxVersionForModel: Version

workingCopy

workingCopy: IWorkingCopy

Accessors

id

  • get (): string
  • Returns string

root

Methods

addModuleUnitInterfaces

  • addModuleUnitInterfaces(structuresJson: string | IAbstractUnitJson[]): void

allUnits

  • allUnits(): IAbstractUnit[]
  • Returns a defensive collection of all units in this model.

    Returns IAbstractUnit[]

closeConnection

deleteFile

  • deleteFile(filePath: string, callback: IVoidCallback, errorCallback: IErrorCallback): void
  • deleteFile(filePath: string): Promise<void>

deleteWorkingCopy

exportModuleMpk

  • exportModuleMpk(moduleId: string, outFilePath: string, callback: IVoidCallback, errorCallback?: IErrorCallback): void
  • exportModuleMpk(moduleId: string, outFilePath: string): Promise<void>

exportMpk

  • exportMpk(outFilePath: string, callback: IVoidCallback, errorCallback?: IErrorCallback): void
  • exportMpk(outFilePath: string): Promise<void>

filterUnitsByCustomWidgetId

  • filterUnitsByCustomWidgetId(workingCopyId: string, widgetId: string, callback: ICallback<string[]>, errorCallback: IErrorCallback): void
  • filterUnitsByCustomWidgetId(workingCopyId: string, widgetId: string): Promise<string[]>

flushChanges

getAppEnvironmentStatus

getAppEnvironmentStatusV2

getAppUpdateStatus

getFile

  • getFile(filePath: string, outFilePath: string, callback: IVoidCallback, errorCallback: IErrorCallback): void
  • getFile(filePath: string, outFilePath: string): Promise<void>

getFilePaths

  • getFilePaths(callback: ICallback<string[]>, errorCallback: IErrorCallback): void
  • getFilePaths(): Promise<string[]>

getFiles

getLastEventId

  • getLastEventId(callback: ICallback<number>, errorCallback?: IErrorCallback): void
  • getLastEventId(): Promise<number>

handleError

  • handleError(message: string, errorCallback: IErrorCallback | undefined): void
  • Parameters

    Returns void

importModuleMpk

  • importModuleMpk(mpkPath: string | Blob, callback: IVoidCallback, errorCallback?: IErrorCallback): void
  • importModuleMpk(mpkPath: string | Blob): Promise<void>

loadUnitById

  • loadUnitById<T>(id: string, forceRefresh: boolean | undefined, callback: ICallback<T>, errorCallback?: IErrorCallback): void
  • loadUnitById<T>(id: string, forceRefresh: boolean | undefined): Promise<T>
  • Fetches a complete unit. The result might be returned from the cache.

    Type parameters

    Parameters

    Returns void

  • Type parameters

    Parameters

    • id: string
    • forceRefresh: boolean | undefined

    Returns Promise<T>

onBuildResultEventReceived

  • onBuildResultEventReceived(callback: function): void

onFileChangesReceived

  • onFileChangesReceived(callback: function): void
  • Parameters

    • callback: function
        • (files: string[]): void
        • Parameters

          • files: string[]

          Returns void

    Returns void

onModelChange

onModelEventProcessed

onWorkingCopyDataEventReceived

  • onWorkingCopyDataEventReceived(callback: function): void

putFile

  • putFile(inFilePath: string | Blob, filePath: string, callback: IVoidCallback, errorCallback: IErrorCallback): void
  • putFile(inFilePath: string | Blob, filePath: string): Promise<void>

setErrorHandler

startAppUpdate

startReceivingModelEvents

  • startReceivingModelEvents(): void

startReceivingWorkingCopyEvents

  • startReceivingWorkingCopyEvents(): void
  • Before calling this API, ensure that all handlers (i.e. onBuildResultEventReceived() and/or onWorkingCopyDataEventReceived() ), have been registered

    Returns void

stopReceivingModelEvents

  • stopReceivingModelEvents(): void

stopReceivingWorkingCopyEvents

  • stopReceivingWorkingCopyEvents(): void

Generated using TypeDoc