Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IModulePackageManager

System manager for managing module packages. Through this you can retrieve various kinds of information related to the module packages that are currently installed on the DART-Platform.

api-version

1

user

Hierarchy

Index

Properties

autoLoadFrameworkModules: Monitorable<{ packageName: string; subTypes: string[] }[]>

Monitorable an array of target framework modules to loading automatically.

api-version

2

user
favoriteComponentInfos: Monitorable<{ componentId: string; packageName: string }[]>

Monitorable an array of favorite component data.

api-version

1

system
api-version

1

system

Methods

  • getEssentialModulePackageNames(): string[]
  • Return essential module package names

    api-version

    1

    system

    Returns string[]

    module package names which are required essentially to run DART-Platform.

  • getEssentialShortcutModulePackageNames(): string[]
  • Return essential shortcut's module package names

    api-version

    1

    system

    Returns string[]

    module package names which are essentially registered as shortcut.

  • Call to retrieve an installed module package that matched with the package name. This value cannot be null.

    api-version

    1

    user

    Parameters

    • packageName: string

      The package name of the desired module package.

    Returns null | IModulePackageInfo

    IModulePackageInfo object containing information about the module package, or null if there are none.

  • Call to retrieve installed module packages that matched with the module type.

    api-version

    1

    user

    Parameters

    • type: string

      The module type of the desired module package. If it is null or not defined, all installed module packages are retrieved.

    Returns IModulePackageInfo[]

    Return array of IModulePackageInfo objects containing information about the module package, or null if there are none.

  • Install the given module package file or data. If already module package which has same package name has been installed, then the operation will be failed. This operation will be failed as below situation:

    • Already module package which has same package name has been installed
    • Requested module package's sdkVersion is not valid on system.
    api-version

    1

    system

    Parameters

    • packageFile: string | Uint8Array

      A .dm file path or data of the module package to install.

    • name: string

      A name of a requested module package.

    • Optional options: PackageInstallOptions

      Additional options (PackageInstallOptions).

    Returns Promise<IModulePackageInfo>

    IModulePackageInfo object after installation the module successfully, otherwise null.

  • Install the given module package file or data. If already module package which has same package name has been installed, then system will try to update the module package.

    api-version

    1

    system

    Parameters

    Returns Promise<IModulePackageInfo>

    IModulePackageInfo object after installation the module successfully, otherwise null.

  • isInstalled(packageName: string): boolean
  • Get whether the given module package is installed.

    api-version

    1

    user

    Parameters

    • packageName: string

      The package name of the desired module package.

    Returns boolean

    Whether the given module package is installed.

  • loadFrameworkModule(packageName: string, subType: string): Promise<{ status: FrameworkModuleStatus; uniqueId: number }>
  • setAutoLoadFrameworkModuleEnabled(enabled: boolean, packageName: string, subType?: string): Promise<boolean>
  • Sets whether to load a framework package automatically.

    api-version

    2

    system

    Parameters

    • enabled: boolean

      Whether to load the packageName automatically.

    • packageName: string

      A desired framework module package name to load.

    • Optional subType: string

      A desired framework module's subtype Manifest.FRAMEWORK_SUB_TYPE. If subType is null and {@link enabled} is false, all subTypes will be disabled.

    Returns Promise<boolean>

    Return Fulfills with true if the request has been operated successfully, otherwise false.

  • setFavoriteComponent(packageName: string, componentId: null | string, favorite: boolean): void
  • Set favorite state of the component.

    api-version

    1

    system

    Parameters

    • packageName: string

      The package name of the desired module package.

    • componentId: null | string

      The component id of the desired module package.

    • favorite: boolean

      True if the component is set as favorite.

    Returns void

  • setStartingComponent(packageName: string, options: null | { action?: string; category?: string; componentId?: string }, enabled: boolean): boolean
  • Set a staring module component. When Dart-Platform booting is complete, the component registered as a starting component is automatically executed.

    api-version

    1

    system

    Parameters

    • packageName: string

      The package name of the desired module package.

    • options: null | { action?: string; category?: string; componentId?: string }

      optional information about the component of the starting module package.

    • enabled: boolean

      True if you want to set the module package as starting module.

    Returns boolean

    Return true if the request has been operated successfully, otherwise false.

  • Uninstall the given module package name. If there is no module package which is matched with the package name, then the operation will be failed.

    api-version

    1

    system

    Parameters

    Returns Promise<void>

    Return true if the package has been uninstalled successfully, otherwise false.

  • Update the given module package file or data. This operation will be failed as below situation:

    • There is no module package which is matched with the package name.
    • Signatures of old module package and new module package are not same.
    • Requested module package's version is lower than installed module package.
    • Requested module package's sdkVersion is not valid on system.
    api-version

    1

    system

    Parameters

    • packageFile: string | Uint8Array

      A .dm file path or data of the module package to install.

    • name: string

      A name of a requested module package.

    • Optional options: PackageUpdateOptions

      Additional options (PackageUpdateOptions).

    Returns Promise<IModulePackageInfo>

    IModulePackageInfo object after installation the module successfully, otherwise null.

Generated using TypeDoc