Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IAbstractModel

This interface exposes a single Mendix Model. This interface contains the parts of the Model that are exposed through the SDK.

Hierarchy

Implemented by

Index

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.

metadata

metadata: IWorkingCopy

The meta data of the model.

mxVersionForModel

mxVersionForModel: Version

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

Methods

allUnits

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

    Returns IAbstractUnit[]

closeConnection

  • closeConnection(callback: IVoidCallback, errorCallback?: IErrorCallback): any
  • Ends the connection with the Model API client. Flushes any pending deltas and invokes the callback once complete. (Errors will be handled through the default modelstore error handler.)

    Parameters

    • callback: IVoidCallback
    • Optional errorCallback: IErrorCallback

    Returns any

deleteFile

  • deleteFile(filePath: string, callback: IVoidCallback, errorCallback: IErrorCallback): any
  • Deletes the file with the specified filepath.

    Parameters

    • filePath: string
    • callback: IVoidCallback
    • errorCallback: IErrorCallback

    Returns any

deleteWorkingCopy

  • deleteWorkingCopy(callback: IVoidCallback, errorCallback?: IErrorCallback): any
  • Deletes this model from the server, and the (SDK) client. If you are altering the model before deleting it, make sure to call this method in the callback of closeConnection.

    Parameters

    • callback: IVoidCallback
    • Optional errorCallback: IErrorCallback

    Returns any

deploy

  • deploy(forceFullDeployment: boolean, callback: ICallback<IDeploymentResult>, errorCallback?: IErrorCallback): any
  • Deploy the working copy.

    Parameters

    • forceFullDeployment: boolean
    • callback: ICallback<IDeploymentResult>
    • Optional errorCallback: IErrorCallback

    Returns any

exportMpk

  • exportMpk(outFilePath: string, callback: IVoidCallback, errorCallback?: IErrorCallback): any
  • 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

    • outFilePath: string
    • callback: IVoidCallback
    • Optional errorCallback: IErrorCallback

    Returns any

findModuleByQualifiedName

  • findModuleByQualifiedName(qname: string): any
  • Given a moduleName, returns a module name (For modules, their qualified name equals their name)

    Parameters

    • qname: string

    Returns any

getDeploymentStatus

  • getDeploymentStatus(callback: ICallback<IDeploymentResult>, errorCallback?: IErrorCallback): any
  • Get the deployment status of the working copy. Can be STARTED, STARTING, UPDATING, STOPPED and APP_NOT_FOUND. Contains other deployment info as well.

    Parameters

    Returns any

getEditorData

  • getEditorData(callback: ICallback<IEditorData>, errorCallback: IErrorCallback): any
  • Returns UUIDs for helper working copies for each supported Mendix version.

    These are pre-defined working copies that are accessible for read operations, and contain units that might come in handy when creating pages from templates.

    Parameters

    • callback: ICallback<IEditorData>
    • errorCallback: IErrorCallback

    Returns any

getFile

  • getFile(filePath: string, outFilePath: string, callback: function, errorCallback: IErrorCallback): any
  • 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 any

getFilePaths

  • getFilePaths(callback: ICallback<string[]>, errorCallback: IErrorCallback): any
  • Returns an array of all filepaths in the working copy.

    Parameters

    • callback: ICallback<string[]>
    • errorCallback: IErrorCallback

    Returns any

getFiles

  • getFiles(callback: function, errorCallback: IErrorCallback): any
  • getFiles(options: IGetFilesOptions, callback: function, errorCallback: IErrorCallback): any
  • 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[] | any): void
        • Parameters

          • Optional response: string[] | any

          Returns void

    • errorCallback: IErrorCallback

    Returns any

  • Parameters

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

          • Optional response: string[] | any

          Returns void

    • errorCallback: IErrorCallback

    Returns any

loadUnitById

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

    • id: string
    • forceRefresh: boolean
    • callback: ICallback<T>
    • Optional errorCallback: IErrorCallback

    Returns any

putFile

  • putFile(inFilePath: string | Blob, filePath: string, callback: IVoidCallback, errorCallback: IErrorCallback): any
  • Uploads the supplied file to the specified filepath.

    Parameters

    • inFilePath: string | Blob
    • filePath: string
    • callback: IVoidCallback
    • errorCallback: IErrorCallback

    Returns any

Generated using TypeDoc