Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Model

Implementation of IModel.

Hierarchy

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Protected _areUnitInterfacesLoaded

_areUnitInterfacesLoaded: boolean

Protected _connectionConfig

_connectionConfig: ISdkConfig

Protected _deltaQueue

_deltaQueue: DeltaQueue

Protected _unitTypes

_unitTypes: string[]

Protected _unitsByType

_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.

Protected _unresolvedReferences

_unresolvedReferences: ByNameReference<any>[]

Private allModelClasses

allModelClasses: any

id

id: string

metaModelVersion

metaModelVersion: Version

metadata

metadata: IWorkingCopy

mxVersionForModel

mxVersionForModel: Version

root

root: IProject

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

Methods

Protected _assertConnectionClosed

  • _assertConnectionClosed(): void
  • 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.

    Returns void

Protected _loadMetaData

  • _loadMetaData(workingCopyId: string, callback: function, errorCallback: IErrorCallback): void
  • Parameters

    • workingCopyId: string
    • callback: function
        • (processCallback: IVoidCallback): void
        • Parameters

          • processCallback: IVoidCallback

          Returns void

    • errorCallback: IErrorCallback

    Returns void

Protected _loadUnit

  • _loadUnit<T>(unit: IAbstractUnit, callback: ICallback<T>, errorCallback?: IErrorCallback): void

Protected _loadUnitInterfaces

  • _loadUnitInterfaces(workingCopyId: string, callback: function, errorCallback: IErrorCallback): void
  • Loads all unit interfaces and caches them. This function cannot be called twice.

    Parameters

    • workingCopyId: string
    • callback: function
        • (processCallback: IVoidCallback): void
        • Parameters

          • processCallback: IVoidCallback

          Returns void

    • errorCallback: IErrorCallback

    Returns void

Protected _processLoadedMetaData

Protected _processLoadedUnitInterfaces

Protected _resolveContainer

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

Protected _unitInterfacesByType

  • _unitInterfacesByType<T>(typeName: string): T[]

Protected _warnAboutUnsupportedType

  • _warnAboutUnsupportedType(propertyName: string, qname: string): void
  • 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.typeName, "Expenses.Expense.Price");

    Parameters

    • propertyName: string
    • qname: string

    Returns void

allConstants

allConsumedAppServices

allDataSets

allDocumentTemplates

allDocuments

allDomainModels

allEnumerations

allExportMappings

allFolderBases

allFolders

allFormBases

allImageCollections

allImportMappings

allImportedWebServices

allJavaActions

allJsonStructures

allLayouts

allMappingDocuments

allMenuDocuments

allMicroflowBases

allMicroflows

allModuleDocuments

allModuleSecurities

allModules

allMxSchemas

allNavigationDocuments

allPages

allProjectConversions

allProjectDocuments

allProjectSecurities

allProjectSettings

allProjects

allPublishedAppServices

allPublishedODataServices

allPublishedRestServiceBases

allPublishedRestServices

allPublishedServiceBases

allPublishedWebServices

allRegularExpressions

allRules

allScheduledEvents

allSnippets

allSystemTextCollections

allUnits

allXmlSchemas

closeConnection

  • closeConnection(callback: IVoidCallback, errorCallback?: IErrorCallback): void

deleteFile

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

deleteWorkingCopy

  • deleteWorkingCopy(callback: IVoidCallback, errorCallback?: IErrorCallback): void

deploy

  • deploy(forceFullDeployment: boolean, callback: ICallback<IDeploymentResult>, errorCallback?: IErrorCallback): void

exportMpk

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

findAppServiceActionByQualifiedName

findAppServiceActionParameterByQualifiedName

findAssociationBaseByQualifiedName

findAttributeByQualifiedName

  • findAttributeByQualifiedName(qname: string): IAttribute

findConstantByQualifiedName

  • findConstantByQualifiedName(qname: string): IConstant

findDataSetByQualifiedName

  • findDataSetByQualifiedName(qname: string): IDataSet

findDataSetParameterByQualifiedName

findDocumentTemplateByQualifiedName

findEntityByQualifiedName

  • findEntityByQualifiedName(qname: string): IEntity

findEnumerationByQualifiedName

  • findEnumerationByQualifiedName(qname: string): IEnumeration

findExportMappingByQualifiedName

findImageByQualifiedName

  • findImageByQualifiedName(qname: string): IImage

findImportMappingByQualifiedName

findImportedWebServiceByQualifiedName

findJavaActionByQualifiedName

  • findJavaActionByQualifiedName(qname: string): IJavaAction

findJavaActionParameterByQualifiedName

findJsonStructureByQualifiedName

findLayoutByQualifiedName

  • findLayoutByQualifiedName(qname: string): ILayout

findLayoutParameterByQualifiedName

findMenuDocumentByQualifiedName

findMicroflowByQualifiedName

  • findMicroflowByQualifiedName(qname: string): IMicroflow

findMicroflowParameterByQualifiedName

findModuleByQualifiedName

  • findModuleByQualifiedName(qname: string): IModule

findModuleRoleByQualifiedName

  • findModuleRoleByQualifiedName(qname: string): IModuleRole

findPageByQualifiedName

  • findPageByQualifiedName(qname: string): IPage

findRegularExpressionByQualifiedName

findRuleByQualifiedName

  • findRuleByQualifiedName(qname: string): IRule

findRuleParameterByQualifiedName

findSnippetByQualifiedName

  • findSnippetByQualifiedName(qname: string): ISnippet

findUserRoleByQualifiedName

  • findUserRoleByQualifiedName(qname: string): IUserRole

findXmlSchemaByQualifiedName

  • findXmlSchemaByQualifiedName(qname: string): IXmlSchema

getDeploymentStatus

  • getDeploymentStatus(callback: ICallback<IDeploymentResult>, errorCallback?: IErrorCallback): void

getEditorData

  • getEditorData(callback: ICallback<IEditorData>, errorCallback: IErrorCallback): void

getFile

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

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

    Returns void

getFilePaths

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

getFiles

  • getFiles(callback: ICallback<string[] | void>, errorCallback: IErrorCallback): any
  • getFiles(options: IGetFilesOptions, callback: ICallback<string[] | void>, errorCallback: IErrorCallback): any

loadUnitById

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

    Type parameters

    Parameters

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

    Returns void

putFile

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

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

    Returns void

Static create

  • Instantiates a new Model that can communicate with the server for sending and receiving documents. Loading a Model will automatically fetches all unit interfaces for this working copy and invokes the (success) callback, or calls the errorHandler if this fails.

    Parameters

    Returns void

Static createSdkClient

Static read

  • read<IT, CT>(client: IModelApiClient, workingCopyId: string, connectionConfig: ISdkConfig, instance: CT, callback: function, errorCallback: IErrorCallback): void
  • Instantiates a new working copy that can communicate with the server for sending and receiving documents. Reading a working copy will automatically fetch all unit interfaces for this working copy and invoke callback, or call the errorHandler if this fails.

    Type parameters

    Parameters

    • client: IModelApiClient
    • workingCopyId: string
    • connectionConfig: ISdkConfig
    • instance: CT
    • callback: function
        • (model: IT): void
        • Parameters

          • model: IT

          Returns void

    • errorCallback: IErrorCallback

    Returns void

Generated using TypeDoc