Abstract: this class should never be instantiated. Implementation of IModel.
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
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.)
Map unitId -> unit, containing all units of this model, which could be partial(ly loaded).
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.
The Mendix meta model version related to the project.
The Mendix product version the model was created with/in. Note: this does not have to equal the meta model version.
The meta data of the model.
Working copy id of the current opened model (read only)
Registers the given
unit in the cache(s).
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
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.
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.
Unregisters the given
unit from the cache(s).
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.
Return the non-defensive set of unit interfaces of a certain type. Creates the collection lazily if needed.
Adds the given module json to the project, which will make the module and its units read-only and unloadable. Returns the added module.
Gives error if
Returns a defensive collection of all units in this model.
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.
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.
Downloads the file specified by the supplied filepath. If outFilePath is empty, the raw response body will be provided in the callback
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
Get the event id for the last processed batch of deltas in Model Server after flushing any pending deltas. If a callback is provided but no error callback is provided, errors will be handled through the default modelstore error handler.
Imports the given module MPK.
Importing a module overwrites existing files in the project.
Gives error if
Fetches a complete unit. The result might be returned from the cache.
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.
Before calling this API, ensure that all handlers (i.e. onModelEventProcessed()), have been registered
Before calling this API, ensure that all handlers (i.e. onBuildResultEventReceived() and/or onWorkingCopyDataEventReceived() ), have been registered
Generated using TypeDoc