map.apps Bundle APIs 4.20.0
    Preparing search index...

    Interface Framework

    The Framework (or 'system' bundle) is a special instance of a bundle. It has the id === 0 and some special methods

    interface Framework {
        equals(other: Bundle): boolean;
        getAllRequiredBundles(skip?: (bundle: Bundle) => boolean): Bundle[];
        getBundleContext(): BundleContext;
        getBundleId(): number;
        getHeaders(locale?: string): BundleHeaders;
        getI18n(): I18N;
        getI18N(): I18N;
        getId(): number;
        getLocation(): string;
        getNamespace(): string;
        getRegisteredServices(): ServiceReference[];
        getRequiredBundleEntries(): {
            bundle: Bundle;
            policy: "optional"
            | "mandatory";
        }[];
        getRequiredBundles(): Bundle[];
        getResourceURL(path: string, otherBundleName?: string): string;
        getServicesInUse(): ServiceReference[];
        getState(): BundleState;
        getStateTitle(): keyof BundleStates;
        getSymbolicName(): string;
        getVersion(): SemVer;
        init(): Promise<Framework>;
        isFrameworkStarted(): boolean;
        setHeader(name: string, value: unknown): this;
        start(): Promise<Framework>;
        stop(): Promise<Framework>;
        uninstall(): Bundle | Promise<Bundle>;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Check if the bundle equals another bundle

      Parameters

      • other: Bundle

        the other bundle

      Returns boolean

      true if the bundle is equal to the other bundle.

    • Lookup all required bundles with an optional skip filter.

      Parameters

      • Optionalskip: (bundle: Bundle) => boolean

        a function that will determine if a bundle should be skipped (optional)

      Returns Bundle[]

      an array of required bundles.

    • Get the ID of the bundle.

      Returns number

      the bundle ID.

      Use getId() instead.

    • Provides access to the manifest metadata.

      Parameters

      • Optionallocale: string

        e.g. de, en (optional)

      Returns BundleHeaders

      the bundle header metadata.

    • Provides access to the i18n data of the bundle.

      Returns I18N

      Use get getI18N() (with a capital N) instead.

    • Provides access to the i18n data of the bundle.

      Returns I18N

      the i18n data

    • Get the ID of the bundle.

      Returns number

      the bundle ID.

    • Get the location of the bundle. The location is the path in the JS Registry backend

      Returns string

      the location

    • Get the namespace of the bundle. Typically, it is the same as the symbolic name.

      Returns string

      the namespace

    • Lookup all required bundles together with their usage policy (mandatory or optional).

      Returns { bundle: Bundle; policy: "optional" | "mandatory" }[]

      an array of bundles and their usage policy.

    • Lookup all installed dependencies of the bundle.

      Returns Bundle[]

      an array of bundles that are dependencies.

    • Creates a URL to a given path, located in this or another bundle.

      Parameters

      • path: string

        resource path

      • OptionalotherBundleName: string

        name of another bundle (optional).

      Returns string

      resolved URL to given path.

    • Get the current state value of this bundle.

      Returns BundleState

      the current bundle state as number

    • Get the symbolic name (unique ID) of the bundle.

      Returns string

      the name

    • Get the version of the bundle.

      Returns SemVer

      the semantic version

    • Initialize the framework bundle.

      Returns Promise<Framework>

      a promise resolving to the initialized framework

    • Indicate, if the framework is started.

      Returns boolean

      true if the framework is started.

    • Set a property in the bundle manifest. This method is for internal use only! Please never change the bundle's manifest data.

      Parameters

      • name: string

        manifest key

      • value: unknown

        new value.

      Returns this

      the bundle

    • Start the framework bundle.

      Returns Promise<Framework>

      a promise resolving to the started framework

    • Stops the framework bundle.

      Returns Promise<Framework>

      a promise resolving to the stopped framework

    • Uninstalls the bundle.

      Returns Bundle | Promise<Bundle>

      a promise resolving to the bundle or the bundle itself.