Class ApplicationService

Hierarchy (view full)

Constructors

Methods

  • Removes an application with given id.

    Parameters

    • entityOrId: string | number | IApplication

      entity or id of the application.

      Example


      const removeApp: object = {
      id: 38
      };

      (async () => {
      const {data, res} = await applicationService.delete(removeApp);
      // data will be null
      })();

    Returns Promise<IResult<null>>

    Response wrapped in [[IResult]]

  • Extracts instance names of the provided IApplicationManagedObject.

    Parameters

    Returns string[]

    instance names

    Example


    const applicationId: number = 1;

    (async () => {
    const {data, res} = await applicationService.getStatusDetails(applicationId);
    const instances = data.map((appMO) => applicationService.getInstanceNames(appMO));
    })();
  • Checks if current user can access specified application.

    Parameters

    • application: string | Partial<IApplication>

      Application name or contextPath as a string or Application object.

      Example


      const checkApp: object = {
      name: 'myApplication'
      };

      (async () => {
      const {data, res} = await applicationService.isAvailable(checkApp);
      })();

    Returns Promise<IResult<boolean>>

    Response wrapped in [[IResult]]

  • Dynamic options are stored on the API in a specific config: {} object. They can be used to configure the app dynamically.

    Note: To avoids conflicts with the default Config, it is recommended to use a certain namespace.

    Type Parameters

    • T

    Parameters

    • entityOrId: string | number | IApplication

      Entity or Id of the application.

    • config: T

      Configuration to be updated.

    Returns Promise<IApplication & {
        config: T;
    }>

    Returns updated configuration.