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

    Interface Bundle

    A Bundle (a.k.a. a JavaScript Package).

    interface Bundle {
        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;
        setHeader(name: string, value: unknown): this;
        start(): Promise<Bundle>;
        stop(): Promise<Bundle>;
        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 bundle context.

      Returns BundleContext

      the bundle context

    • 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

    • Provides access to all services registered by this bundle.

      Returns ServiceReference[]

      an array of service references

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

    • Provides access to all services used (consumed) by this bundle.

      Returns ServiceReference[]

      an array of service references

    • Get the current state value of this bundle.

      Returns BundleState

      the current bundle state as number

    • Get the current bundle state name.

      Returns keyof BundleStates

      the current bundle state as string

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

      Returns string

      the name

    • Get the version of the bundle.

      Returns SemVer

      the semantic version

    • 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

    • Starts the bundle.

      Returns Promise<Bundle>

      a promise resolving to the bundle.

    • Stops the bundle.

      Returns Promise<Bundle>

      a promise resolving to the bundle.

    • Uninstalls the bundle.

      Returns Bundle | Promise<Bundle>

      a promise resolving to the bundle or the bundle itself.