Options
All
  • Public
  • Public/Protected
  • All
Menu

Implementation of IModel.

Hierarchy

  • BaseModel
    • Model

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

Properties

internal
_errorHandler: IErrorCallback
internal
_isInitialized: boolean = false
internal
_qualifiedNameCache: QualifiedNameCache = ...

Map qualifiedName -> AbstractElement[]; the same qualified name could potentially refer to different kind of objects; e.g. MyFirstModule.SecondThing could both be an entity or a microflow.

A structure has a qualified name precisely if it's public, publicly contained through namespaces and has a public, 1-string-typed name property. In other words: every structure having a qualified name is already present in the interface of the containing unit. So, as soon as processUnitInterfaces has been called the cache is complete (no lazy loading). (It still needs to be continuously updated obviously.)

internal
_units: IUnitsMap = {}

Map unitId -> unit, containing all units of this model, which could be partial(ly loaded).

internal
_unitsByType: IUnitsByTypeCache = {}

Map unitType -> units[], containing all units of this model, per type, but not sorted in any particular order. Please extend the type whenever applicable, for convenience of the programmer.

internal
deltaManager: IDeltaManager
internal
detachedStructures: IStructure[] = []
internal
metaModelVersion: Version
modelEventManager: IModelEventManager
internal
mxVersionForModel: Version
workingCopy: IWorkingCopy

Accessors

  • get _unitTypes(): string[]
  • internal

    Returns string[]

  • get id(): string
  • Returns string

  • Returns the structural unit of type "Projects$Project" which is the project's root, cast to the appropriate type.

    Returns IProject

Methods

  • _addDetachedStructure(structure: IStructure): void
  • internal

    Parameters

    Returns void

  • Registers the given unit in the cache(s).

    internal

    Parameters

    Returns void

  • Structural units have children (e.g., folders have documents), but in storage the inverse is stored: documents specify in which parent they reside. However, in the SDK we want to be able to read the children of a folder, so these kind of properties are expressed using StructuralChild(List)Property objects, see properties/structural.ts. We notify structural parents that a child was added upon loading a child structure, so that parent can do the appropriate bookkeeping at that time (and only once). This way we avoid having to visit all unit interfaces to gather all children of a specific structural child (list) property.

    internal

    Parameters

    Returns void

  • _allModelClasses(): any
  • internal

    Returns any

  • _allOfTypes<T>(structureTypeNames: string[]): T[]
  • internal

    Type parameters

    Parameters

    • structureTypeNames: string[]

    Returns T[]

  • If a model element changes its name, broken by-name references should be attempted to resolve.

    In the future this might be made smarter and less expensive, once that becomes an issue.

    internal

    Parameters

    Returns void

  • _removeDetachedStructure(structure: IStructure): void
  • internal

    Parameters

    Returns void

  • Unregisters the given unit from the cache(s).

    internal

    Parameters

    Returns void

  • internal

    Parameters

    Returns void

  • _resolveContainer(unit: IAbstractUnit, containerId: string): void
  • internal

    Parameters

    Returns void

  • _resolveName(structureTypeName: string, qualifiedName: null | string): null | IAbstractElement
  • Given an object type name and a qualified name, finds the corresponding element (or null if the reference is broken). Will always succeed for unbroken references, since all objects that are referred by name should be part of the public interface of the model.

    Example usage: modelStore.resolveName(domainmodels.Attribute.structureTypeName, "Expenses.Expense.Price");

    internal

    Parameters

    • structureTypeName: string
    • qualifiedName: null | string

    Returns null | IAbstractElement

  • _sendDelta(delta: Delta): void
  • internal

    Parameters

    Returns void

  • _unitInterfacesByType<T>(structureTypeName: string): T[]
  • Return the non-defensive set of unit interfaces of a certain type. Creates the collection lazily if needed.

    internal

    Type parameters

    Parameters

    • structureTypeName: string

    Returns T[]

  • Parameters

    Returns IStructuralUnit

  • Returns IBuildingBlock[]

  • Returns ICodeAction[]

  • Returns IConstant[]

  • Returns IConsumedAppService[]

  • allConsumedBusinessEventServices(): IConsumedBusinessEventService[]
  • Returns IConsumedBusinessEventService[]

  • allConsumedKafkaServices(): IConsumedKafkaService[]
  • Returns IConsumedKafkaService[]

  • allConsumedODataServices(): IConsumedODataService[]
  • Returns IConsumedODataService[]

  • Returns IDataSet[]

  • Returns IDocumentTemplate[]

  • Returns IDocument[]

  • Returns IDomainModel[]

  • Returns IEnumeration[]

  • Returns IExportMapping[]

  • Returns IFolderBase[]

  • Returns IFolder[]

  • Returns IFormBase[]

  • Returns IImageCollection[]

  • Returns IImportMapping[]

  • Returns IImportedWebService[]

  • Returns IJavaAction[]

  • Returns IJavaScriptAction[]

  • Returns IJsonStructure[]

  • Returns ILayout[]

  • Returns IMappingDocument[]

  • Returns IMenuDocument[]

  • Returns IMessageDefinitionCollection[]

  • Returns IMicroflowBase[]

  • Returns IMicroflow[]

  • Returns IModuleDocument[]

  • Returns IModuleSecurity[]

  • Returns IModuleSettings[]

  • Returns IModule[]

  • Returns IMxSchema[]

  • Returns INanoflow[]

  • allNativeLayouts(): INativeLayout[]
  • Returns INativeLayout[]

  • allNativePages(): INativePage[]
  • Returns INativePage[]

  • Returns INavigationDocument[]

  • Returns IPageTemplate[]

  • Returns IPage[]

  • Returns IProjectConversion[]

  • Returns IProjectDocument[]

  • Returns IProjectSecurity[]

  • Returns IProjectSettings[]

  • Returns IProject[]

  • Returns IPublishedAppService[]

  • allPublishedBusinessEventServices(): IPublishedBusinessEventService[]
  • Returns IPublishedBusinessEventService[]

  • allPublishedKafkaServices(): IPublishedKafkaService[]
  • Returns IPublishedKafkaService[]

  • Returns IPublishedODataService[]

  • Returns IPublishedRestService[]

  • Returns IPublishedServiceBase[]

  • Returns IPublishedWebService[]

  • Returns IQueue[]

  • Returns IRegularExpression[]

  • allRemoteEntitySourceDocuments(): IRemoteEntitySourceDocument[]
  • Returns IRemoteEntitySourceDocument[]

  • Returns IRule[]

  • Returns IScheduledEvent[]

  • Returns IServerSideMicroflow[]

  • Returns ISnippet[]

  • Returns ISystemTextCollection[]

  • Returns ITemplateFormBase[]

  • Returns a defensive collection of all units in this model.

    Returns IAbstractUnit[]

  • Returns IWorkflow[]

  • Returns IXmlSchema[]

  • Parameters

    Returns void

  • Returns Promise<void>

  • completePendingChange(eventId?: number): void
  • internal

    Parameters

    • Optional eventId: number

    Returns void

  • createElement<T>(typeName: T): ConcreteModelElements[T]
  • Type parameters

    • T: keyof ConcreteModelElements

    Parameters

    • typeName: T

    Returns ConcreteModelElements[T]

  • Parameters

    Returns void

  • Parameters

    • filePath: string

    Returns Promise<void>

  • Deletes this working copy from the server, and the (SDK) client.

    Parameters

    Returns void

  • Returns Promise<void>

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

    Returns void

  • Parameters

    • moduleId: string
    • outFilePath: string

    Returns Promise<void>

  • Parameters

    Returns void

  • Parameters

    • outFilePath: string

    Returns Promise<IExportMpkResponse>

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

    Returns void

  • Parameters

    • workingCopyId: string
    • widgetId: string

    Returns Promise<string[]>

  • Parameters

    • qname: string

    Returns null | IAppServiceAction

  • Parameters

    • qname: string

    Returns null | IAppServiceActionParameter

  • Parameters

    • qname: string

    Returns null | IAssociationBase

  • findAttributeByQualifiedName(qname: string): null | IAttribute
  • Parameters

    • qname: string

    Returns null | IAttribute

  • findConstantByQualifiedName(qname: string): null | IConstant
  • Parameters

    • qname: string

    Returns null | IConstant

  • findConsumedKafkaServiceByQualifiedName(qname: string): null | IConsumedKafkaService
  • Parameters

    • qname: string

    Returns null | IConsumedKafkaService

  • findConsumedODataServiceByQualifiedName(qname: string): null | IConsumedODataService
  • Parameters

    • qname: string

    Returns null | IConsumedODataService

  • findDataSetByQualifiedName(qname: string): null | IDataSet
  • Parameters

    • qname: string

    Returns null | IDataSet

  • Parameters

    • qname: string

    Returns null | IDataSetParameter

  • Parameters

    • qname: string

    Returns null | IDocumentTemplate

  • findEntityByQualifiedName(qname: string): null | IEntity
  • Parameters

    • qname: string

    Returns null | IEntity

  • findEnumerationByQualifiedName(qname: string): null | IEnumeration
  • Parameters

    • qname: string

    Returns null | IEnumeration

  • Parameters

    • qname: string

    Returns null | IEnumerationValue

  • findExportMappingByQualifiedName(qname: string): null | IExportMapping
  • Parameters

    • qname: string

    Returns null | IExportMapping

  • findImageByQualifiedName(qname: string): null | IImage
  • Parameters

    • qname: string

    Returns null | IImage

  • findImportMappingByQualifiedName(qname: string): null | IImportMapping
  • Parameters

    • qname: string

    Returns null | IImportMapping

  • Parameters

    • qname: string

    Returns null | IImportedWebService

  • findJavaActionByQualifiedName(qname: string): null | IJavaAction
  • Parameters

    • qname: string

    Returns null | IJavaAction

  • Parameters

    • qname: string

    Returns null | IJavaActionParameter

  • Parameters

    • qname: string

    Returns null | IJavaScriptAction

  • Parameters

    • qname: string

    Returns null | IJavaScriptActionParameter

  • findJsonStructureByQualifiedName(qname: string): null | IJsonStructure
  • Parameters

    • qname: string

    Returns null | IJsonStructure

  • findLayoutByQualifiedName(qname: string): null | ILayout
  • Parameters

    • qname: string

    Returns null | ILayout

  • Parameters

    • qname: string

    Returns null | ILayoutParameter

  • findMenuDocumentByQualifiedName(qname: string): null | IMenuDocument
  • Parameters

    • qname: string

    Returns null | IMenuDocument

  • Parameters

    • qname: string

    Returns null | IMessageDefinition

  • findMicroflowByQualifiedName(qname: string): null | IMicroflow
  • Parameters

    • qname: string

    Returns null | IMicroflow

  • Parameters

    • qname: string

    Returns null | IMicroflowParameter

  • findModuleByQualifiedName(qname: string): null | IModule
  • Parameters

    • qname: string

    Returns null | IModule

  • findModuleRoleByQualifiedName(qname: string): null | IModuleRole
  • Parameters

    • qname: string

    Returns null | IModuleRole

  • findNanoflowByQualifiedName(qname: string): null | INanoflow
  • Parameters

    • qname: string

    Returns null | INanoflow

  • Parameters

    • qname: string

    Returns null | INanoflowParameter

  • findNativeLayoutByQualifiedName(qname: string): null | INativeLayout
  • Parameters

    • qname: string

    Returns null | INativeLayout

  • findNativePageByQualifiedName(qname: string): null | INativePage
  • Parameters

    • qname: string

    Returns null | INativePage

  • Parameters

    • qname: string

    Returns null | INavigationProfile

  • findPageByQualifiedName(qname: string): null | IPage
  • Parameters

    • qname: string

    Returns null | IPage

  • findPageParameterByQualifiedName(qname: string): null | IPageParameter
  • Parameters

    • qname: string

    Returns null | IPageParameter

  • findQueueByQualifiedName(qname: string): null | IQueue
  • Parameters

    • qname: string

    Returns null | IQueue

  • Parameters

    • qname: string

    Returns null | IRegularExpression

  • findRemoteEntitySourceDocumentByQualifiedName(qname: string): null | IRemoteEntitySourceDocument
  • Parameters

    • qname: string

    Returns null | IRemoteEntitySourceDocument

  • findRuleByQualifiedName(qname: string): null | IRule
  • Parameters

    • qname: string

    Returns null | IRule

  • findRuleParameterByQualifiedName(qname: string): null | IRuleParameter
  • Parameters

    • qname: string

    Returns null | IRuleParameter

  • findSnippetByQualifiedName(qname: string): null | ISnippet
  • Parameters

    • qname: string

    Returns null | ISnippet

  • findUserRoleByQualifiedName(qname: string): null | IUserRole
  • Parameters

    • qname: string

    Returns null | IUserRole

  • Parameters

    • qname: string

    Returns null | IUserTaskOutcome

  • findWorkflowByQualifiedName(qname: string): null | IWorkflow
  • Parameters

    • qname: string

    Returns null | IWorkflow

  • findXmlSchemaByQualifiedName(qname: string): null | IXmlSchema
  • Parameters

    • qname: string

    Returns null | IXmlSchema

  • Parameters

    Returns void

  • Returns Promise<void>

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

    Returns void

  • Parameters

    • filePath: string
    • outFilePath: string

    Returns Promise<void>

  • Parameters

    Returns void

  • Returns Promise<string[]>

  • Parameters

    Returns void

  • Returns Promise<string[]>

  • Parameters

    Returns void

  • Parameters

    Returns Promise<any>

  • Parameters

    Returns void

  • Returns Promise<number>

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

    Returns void

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

    Returns void

  • Parameters

    • mpkPath: string | Blob

    Returns Promise<void>

  • initializeFromModelServer(workingCopyId: string): Promise<void>
  • internal

    Parameters

    • workingCopyId: string

    Returns Promise<void>

  • loadUnitById<T>(id: string, forceRefresh: undefined | boolean, callback: ICallback<T>, errorCallback?: IErrorCallback): void
  • loadUnitById<T>(id: string, forceRefresh: undefined | boolean): 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: undefined | boolean

    Returns Promise<T>

  • onBuildResultEventReceived(callback: (buildResultEvent: IBuildResultEvent) => void): void
  • Parameters

    Returns void

  • onFileChangesReceived(callback: (files: string[]) => void): void
  • Parameters

    • callback: (files: string[]) => void
        • (files: string[]): void
        • Parameters

          • files: string[]

          Returns void

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns void

  • onUnitLoaded(callback: (modelUnitId: string) => void): void
  • internal

    Parameters

    • callback: (modelUnitId: string) => void
        • (modelUnitId: string): void
        • Parameters

          • modelUnitId: string

          Returns void

    Returns void

  • Parameters

    Returns void

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

    Returns void

  • Parameters

    • inFilePath: string | Blob
    • filePath: string

    Returns Promise<void>

  • Parameters

    Returns void

  • startPendingChange(): void
  • internal

    Returns void

  • startReceivingModelEvents(): void
  • Before calling this API, ensure that all handlers (i.e. onModelEventProcessed()), have been registered

    Returns void

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

    Returns void

  • stopReceivingModelEvents(): void
  • Returns void

  • stopReceivingWorkingCopyEvents(): void
  • Returns void

  • createSdkClient(connectionConfig: ISdkConfig): ModelSdkClientImpl<IModel, Model>
  • Parameters

    Returns ModelSdkClientImpl<IModel, Model>

Generated using TypeDoc