Class: Application

Application

An object representing an application. Allows the developer to create, execute, show/close an application as well as listen to application events.

Constructor

new Application()

Methods

(static) create(appOptions) → {Promise.<Application>}

Creates a new Application.

Parameters:
Name Type Description
appOptions ApplicationOption
Tutorials:
Returns:
Type
Promise.<Application>

(static) createFromManifest(manifestUrl) → {Promise.<Application>}

Retrieves application's manifest and returns a wrapped application.

Parameters:
Name Type Description
manifestUrl string

The URL of app's manifest.

Tutorials:
Returns:
Type
Promise.<Application>

(static) getCurrent() → {Promise.<Application>}

Asynchronously returns an Application object that represents the current application

Tutorials:
Returns:
Type
Promise.<Application>

(static) getCurrentSync() → {Application}

Synchronously returns an Application object that represents the current application

Tutorials:
Returns:
Type
Application

(static) wrap(identity) → {Promise.<Application>}

Asynchronously returns an Application object that represents an existing application.

Parameters:
Name Type Description
identity Identity
Tutorials:
Returns:
Type
Promise.<Application>

(static) wrapSync(identity) → {Application}

Synchronously returns an Application object that represents an existing application.

Parameters:
Name Type Description
identity Identity
Tutorials:
Returns:
Type
Application

close(forceopt) → {Promise.<boolean>}

Closes the application and any child windows created by the application.

Parameters:
Name Type Attributes Default Description
force boolean <optional>
false

Close will be prevented from closing when force is false and ‘close-requested’ has been subscribed to for application’s main window.

Tutorials:
Returns:
Type
Promise.<boolean>

getChildWindows() → {Promise.Array.<_Window>}

Retrieves an array of wrapped fin.Windows for each of the application’s child windows.

Tutorials:
Returns:
Type
Promise.Array.<_Window>

getGroups() → {Promise.Array.Array.<_Window>}

Retrieves an array of active window groups for all of the application's windows. Each group is represented as an array of wrapped fin.Windows.

Tutorials:
Returns:
Type
Promise.Array.Array.<_Window>

getInfo() → {Promise.<ApplicationInfo>}

Retrieves information about the application.

Tutorials:
Returns:
Type
Promise.<ApplicationInfo>

getManifest() → {Promise.<any>}

Retrieves the JSON manifest that was used to create the application. Invokes the error callback if the application was not created from a manifest.

Tutorials:
Returns:
Type
Promise.<any>

getParentUuid() → {Promise.<string>}

Retrieves UUID of the application that launches this application. Invokes the error callback if the application was created from a manifest.

Tutorials:
Returns:
Type
Promise.<string>

getShortcuts() → {Promise.<ShortCutConfig>}

Retrieves current application's shortcut configuration.

Tutorials:
Returns:
Type
Promise.<ShortCutConfig>

getTrayIconInfo() → {Promise.<TrayInfo>}

Retrieves information about the system tray.

The only information currently returned is the position and dimensions.

Tutorials:
Returns:
Type
Promise.<TrayInfo>

getWindow() → {Promise.<_Window>}

Returns an instance of the main Window of the application

Tutorials:
Returns:
Type
Promise.<_Window>

getZoomLevel() → {Promise.<number>}

Returns the current zoom level of the application.

Tutorials:
Returns:
Type
Promise.<number>

isRunning() → {Promise.<boolean>}

Determines if the application is currently running.

Tutorials:
Returns:
Type
Promise.<boolean>

registerUser(userName, appName) → {Promise.<void>}

Manually registers a user with the licensing service. The only data sent by this call is userName and appName.

Parameters:
Name Type Description
userName string

username to be passed to the RVM.

appName string

app name to be passed to the RVM.

Tutorials:
Returns:
Type
Promise.<void>

removeTrayIcon() → {Promise.<void>}

Removes the application’s icon from the tray.

Tutorials:
Returns:
Type
Promise.<void>

restart() → {Promise.<void>}

Restarts the application.

Tutorials:
Returns:
Type
Promise.<void>

run() → {Promise.<void>}

Runs the application. When the application is created, run must be called.

Tutorials:
Returns:
Type
Promise.<void>

scheduleRestart() → {Promise.<void>}

Instructs the RVM to schedule one restart of the application.

Tutorials:
Returns:
Type
Promise.<void>

(async) setAppLogUsername(username) → {Promise.<void>}

Sets a username to correlate with App Log Management.

Parameters:
Name Type Description
username string

Username to correlate with App's Log.

Tutorials:
Returns:
Type
Promise.<void>

setShortcuts(config) → {Promise.<void>}

Sets new application's shortcut configuration.

Parameters:
Name Type Description
config Object

New application's shortcut configuration.

Properties
Name Type Attributes Description
desktop Boolean <optional>

Enable/disable desktop shortcut.

startMenu Boolean <optional>

Enable/disable start menu shortcut.

systemStartup Boolean <optional>

Enable/disable system startup shortcut.

Tutorials:
Returns:
Type
Promise.<void>

setTrayIcon(iconUrl) → {Promise.<void>}

Adds a customizable icon in the system tray and notifies the application when clicked.

Parameters:
Name Type Description
iconUrl string

Image URL to be used as the icon

Tutorials:
Returns:
Type
Promise.<void>

setZoomLevel(level) → {Promise.<void>}

Sets the zoom level of the application. The original size is 0 and each increment above or below represents zooming 20% larger or smaller to default limits of 300% and 50% of original size, respectively.

Parameters:
Name Type Description
level number

The zoom level

Tutorials:
Returns:
Type
Promise.<void>

terminate() → {Promise.<void>}

Closes the application by terminating its process.

Tutorials:
Returns:
Type
Promise.<void>