Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IBaseModel

Hierarchy

Implemented by

Index

Properties

Methods

Properties

id

id: string

Working copy id of the current opened model (read only)

metaModelVersion

metaModelVersion: Version

The Mendix meta model version related to the project.

mxVersionForModel

mxVersionForModel: Version

The Mendix product version the model was created with/in. Note: this does not have to equal the meta model version.

workingCopy

workingCopy: IWorkingCopy

The meta data of the model.

Methods

allBuildingBlocks

allCodeActions

allConstants

allConsumedAppServices

allConsumedODataServices

allDataSets

allDocumentTemplates

allDocuments

allDomainModels

allEnumerations

allExportMappings

allFolderBases

allFolders

allFormBases

allImageCollections

allImportMappings

allImportedWebServices

allJavaActions

allJavaScriptActions

allJsonStructures

allLayouts

allMappingDocuments

allMenuDocuments

allMessageDefinitionCollections

allMicroflowBases

allMicroflows

allModuleDocuments

allModuleSecurities

allModules

allMxSchemas

allNanoflows

allNativeLayouts

allNativePages

allNavigationDocuments

allPageTemplates

allPages

allProjectConversions

allProjectDocuments

allProjectSecurities

allProjectSettings

allProjects

allPublishedAppServices

allPublishedODataServices

allPublishedRestServices

allPublishedServiceBases

allPublishedWebServices

allRegularExpressions

allRules

allScheduledEvents

allServerSideMicroflows

allSnippets

allSystemTextCollections

allTemplateFormBases

allUnits

  • Returns all units in the project, including modules, folders etc. To retrieve all "real" documents (pages, microflows etc.), use allDocuments().

    Returns IAbstractUnit[]

allXmlSchemas

closeConnection

  • Ends the connection with the Model API client. Flushes any pending deltas and invokes the callback once complete. If a callback is provided but no error callback is provided, errors will be handled through the default modelstore error handler.

    Parameters

    Returns void

  • Returns Promise

deleteFile

deleteWorkingCopy

exportModuleMpk

  • exportModuleMpk(moduleId: string, outFilePath: string, callback: IVoidCallback, errorCallback?: IErrorCallback): void
  • exportModuleMpk(moduleId: string, outFilePath: string): Promise
  • Exports the module as MPK. If you are altering the model before running an export make sure to call this method in the callback of closeConnection. If outFilePath is empty, the raw request response will be provided in the callback

    Parameters

    Returns void

  • Parameters

    • moduleId: string
    • outFilePath: string

    Returns Promise

exportMpk

  • exportMpk(outFilePath: string, callback: IVoidCallback, errorCallback?: IErrorCallback): void
  • exportMpk(outFilePath: string): Promise
  • Exports this model as MPK. If you are altering the model before running an export make sure to call this method in the callback of closeConnection. If outFilePath is empty, the raw request response will be provided in the callback

    Parameters

    Returns void

  • Parameters

    • outFilePath: string

    Returns Promise

filterUnitsByCustomWidgetId

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

findAppServiceActionByQualifiedName

findAppServiceActionParameterByQualifiedName

findAssociationBaseByQualifiedName

findAttributeByQualifiedName

  • findAttributeByQualifiedName(qname: string): IAttribute

findConstantByQualifiedName

  • findConstantByQualifiedName(qname: string): IConstant

findDataSetByQualifiedName

  • findDataSetByQualifiedName(qname: string): IDataSet
  • Parameters

    • qname: string

    Returns IDataSet

findDataSetParameterByQualifiedName

findDocumentTemplateByQualifiedName

findEntityByQualifiedName

  • findEntityByQualifiedName(qname: string): IEntity
  • Parameters

    • qname: string

    Returns IEntity

findEnumerationByQualifiedName

  • findEnumerationByQualifiedName(qname: string): IEnumeration

findEnumerationValueByQualifiedName

findExportMappingByQualifiedName

findImageByQualifiedName

  • findImageByQualifiedName(qname: string): IImage
  • Parameters

    • qname: string

    Returns IImage

findImportMappingByQualifiedName

findImportedWebServiceByQualifiedName

findJavaActionByQualifiedName

  • findJavaActionByQualifiedName(qname: string): IJavaAction

findJavaActionParameterByQualifiedName

findJavaScriptActionByQualifiedName

findJavaScriptActionParameterByQualifiedName

findJsonStructureByQualifiedName

findLayoutByQualifiedName

  • findLayoutByQualifiedName(qname: string): ILayout
  • Parameters

    • qname: string

    Returns ILayout

findLayoutParameterByQualifiedName

findMenuDocumentByQualifiedName

findMessageDefinitionByQualifiedName

findMicroflowByQualifiedName

  • findMicroflowByQualifiedName(qname: string): IMicroflow

findMicroflowParameterByQualifiedName

findModuleRoleByQualifiedName

  • findModuleRoleByQualifiedName(qname: string): IModuleRole

findNanoflowByQualifiedName

  • findNanoflowByQualifiedName(qname: string): INanoflow

findNanoflowParameterByQualifiedName

findNativeLayoutByQualifiedName

findNativePageByQualifiedName

  • findNativePageByQualifiedName(qname: string): INativePage

findNavigationProfileByQualifiedName

findPageByQualifiedName

  • findPageByQualifiedName(qname: string): IPage
  • Parameters

    • qname: string

    Returns IPage

findRegularExpressionByQualifiedName

findRuleByQualifiedName

  • findRuleByQualifiedName(qname: string): IRule
  • Parameters

    • qname: string

    Returns IRule

findRuleParameterByQualifiedName

findSnippetByQualifiedName

  • findSnippetByQualifiedName(qname: string): ISnippet
  • Parameters

    • qname: string

    Returns ISnippet

findUserRoleByQualifiedName

  • findUserRoleByQualifiedName(qname: string): IUserRole

findXmlSchemaByQualifiedName

  • findXmlSchemaByQualifiedName(qname: string): IXmlSchema

getAppEnvironmentStatus

getAppEnvironmentStatusV2

getAppUpdateStatus

  • Retrieves App Job by jobId. See also startAppUpdate. In the response the most important field is status.

    Polling for job status should stop once it has reeached "started" | "failed" | "consistencyerrors". Jobs will be cleaned up 10 minutes after the have reached one of this states.

    Parameters

    Returns void

  • Parameters

    • jobId: string

    Returns Promise

getFile

  • getFile(filePath: string, outFilePath: string, callback: function, errorCallback: IErrorCallback): void
  • getFile(filePath: string, outFilePath: string): Promise
  • Downloads the file specified by the supplied filepath. If filePath is empty, the raw request response will be provided in the callback

    Parameters

    • filePath: string
    • outFilePath: string
    • callback: function
        • (response?: any): void
        • Parameters

          • Optional response: any

          Returns void

    • errorCallback: IErrorCallback

    Returns void

  • Parameters

    • filePath: string
    • outFilePath: string

    Returns Promise

getFilePaths

getFiles

  • Returns all files or a subset of files options.filter: glob pattern to limit the set of files options.format: "json" or "zip" options.path: useful if format is "zip". If provided the zip will be stored on disk

    Parameters

    • callback: function
        • (response?: string[]): void
        • Parameters

          • Optional response: string[]

          Returns void

    • errorCallback: IErrorCallback

    Returns void

  • Returns Promise

  • Parameters

    • options: IGetFilesOptions
    • callback: function
        • (response?: string[] | any): void
        • Parameters

          • Optional response: string[] | any

          Returns void

    • errorCallback: IErrorCallback

    Returns void

  • Parameters

    Returns Promise

importModuleMpk

  • importModuleMpk(mpkPath: string | Blob, callback: IVoidCallback, errorCallback: IErrorCallback): void
  • importModuleMpk(mpkPath: string | Blob): Promise
  • Imports the given module MPK.

    Importing a module overwrites existing files in the project.

    Gives error if

    • A module with the same name already exists
    • The module package is not using the same metamodel version as the project

    Parameters

    Returns void

  • Parameters

    • mpkPath: string | Blob

    Returns Promise

loadUnitById

  • loadUnitById<T>(id: string, forceRefresh: boolean, callback: ICallback<T>, errorCallback?: IErrorCallback): void
  • loadUnitById<T>(id: string, forceRefresh: boolean): Promise
  • Given an id, fetches a complete unit. The result might be returned from the cache. Use this method if you have just a unit Id, otherwise, unit.fetch() is a simpler alternative.

    Type parameters

    Parameters

    Returns void

  • Type parameters

    Parameters

    • id: string
    • forceRefresh: boolean

    Returns Promise

onEventProcessed

putFile

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

setErrorHandler

  • Sets the callback that is invoked when an error occurs in an asynchronous operation for which no error callback is specified.

    Examples of such operations are making changes to the model and loading elements.

    Parameters

    Returns void

startAppUpdate

  • Start async deploy flow, creates new app job and returns it. This call immediately returns after successfully initiating the deployment job, and it's progress can be tracked using `getAppUpdateStates.

    A start update packs the mpk and sends it to the cloud environment to update the application, a new application will be provisioned if needed.

    The update job will always converge to a stable state (one of "started" | "failed" | "consistencyerrors"). Use the returned job id to poll for this.

    Parameters

    Returns void

  • Returns Promise

startReceivingEvents

  • startReceivingEvents(): void

stopReceivingEvents

  • stopReceivingEvents(): void

Generated using TypeDoc