Options
All
  • Public
  • Public/Protected
  • All
Menu

Top-level entry point into the Catavolt API

Hierarchy

  • AppContext

Index

Constructors

Private constructor

  • Construct an AppContext This should not be called directly, instead use the 'singleton' method

    Returns AppContext

Properties

Private _appContextState

_appContextState: AppContextState

Private _appWinDefTry

_appWinDefTry: Try<AppWinDef>

Private _devicePropsDynamic

_devicePropsDynamic: Array<function>

Private _devicePropsStatic

_devicePropsStatic: Array<string>

Private _sessionContextTry

_sessionContextTry: Try<SessionContext>

Private _tenantSettingsTry

_tenantSettingsTry: Try<StringDictionary>

lastMaintenanceTime

lastMaintenanceTime: Date = new Date(0)

Static Private ONE_HOUR_IN_MILLIS

ONE_HOUR_IN_MILLIS: number = 60 * 60 * 1000

Static Private _singleton

_singleton: AppContext

Accessors

appWinDefTry

  • Get the AppWinDef Try

    Returns Try<AppWinDef>

clientTimeoutMillis

  • get clientTimeoutMillis(): number
  • Get the number of millis that the client will remain active between calls to the server.

    Returns number

deviceProps

  • get deviceProps(): Array<string>
  • Get the device props

    Returns Array<string>

isLoggedIn

  • get isLoggedIn(): boolean
  • Checked logged in status

    Returns boolean

remainingSessionTime

  • get remainingSessionTime(): number
  • Time remaining before this session is expired by the server

    Returns number

sessionContextTry

  • Get the SessionContext Try

    Returns Try<SessionContext>

sessionHasExpired

  • get sessionHasExpired(): boolean
  • Return whether or not the session has expired

    Returns boolean

tenantSettingsTry

Static defaultTTLInMillis

  • get defaultTTLInMillis(): number
  • Returns number

Static singleton

  • Get the singleton instance of the AppContext

    Returns AppContext

Methods

addDynamicDeviceProp

  • addDynamicDeviceProp(prop: function): void
  • Parameters

    • prop: function
        • (): string
        • Returns string

    Returns void

addStaticDeviceProp

  • addStaticDeviceProp(prop: string): void
  • Parameters

    • prop: string

    Returns void

Private finalizeContext

getRedirForLaunchAction

getWorkbench

  • Get a Worbench by workbenchId

    Parameters

    Returns Future<Workbench>

isFeatureSetAvailable

  • isFeatureSetAvailable(featureSet: FeatureSet): boolean
  • Check for the availability of the given featureSet

    see

    FeatureSet

    Parameters

    Returns boolean

login

  • login(gatewayHost: string, tenantId: string, clientType: string, userId: string, password: string): Future<AppWinDef>
  • Log in and retrieve the AppWinDef

    Parameters

    • gatewayHost: string
    • tenantId: string
    • clientType: string
    • userId: string
    • password: string

    Returns Future<AppWinDef>

loginDirectly

  • loginDirectly(url: string, tenantId: string, clientType: string, userId: string, password: string): Future<AppWinDef>
  • Login directly to a given url, bypassing the gateway host

    Parameters

    • url: string
    • tenantId: string
    • clientType: string
    • userId: string
    • password: string

    Returns Future<AppWinDef>

Private loginFromSystemContext

  • loginFromSystemContext(systemContext: SystemContext, tenantId: string, userId: string, password: string, deviceProps: Array<string>, clientType: string): Future<AppContextValues>
  • Parameters

    • systemContext: SystemContext
    • tenantId: string
    • userId: string
    • password: string
    • deviceProps: Array<string>
    • clientType: string

    Returns Future<AppContextValues>

Private loginOnline

  • loginOnline(gatewayHost: string, tenantId: string, clientType: string, userId: string, password: string, deviceProps: Array<string>): Future<AppContextValues>
  • Parameters

    • gatewayHost: string
    • tenantId: string
    • clientType: string
    • userId: string
    • password: string
    • deviceProps: Array<string>

    Returns Future<AppContextValues>

logout

  • Logout and destroy the session

    Returns Future<VoidResult>

newSessionContext

  • newSessionContext(systemContext: SystemContext, tenantId: string, userId: string, password: string, deviceProps: Array<string>, clientType: string): Future<SessionContext>
  • Login and create a new SessionContext

    Parameters

    • systemContext: SystemContext
    • tenantId: string
    • userId: string
    • password: string
    • deviceProps: Array<string>
    • clientType: string

    Returns Future<SessionContext>

newSystemContext

  • Get a SystemContext obj (containing the server endpoint)

    Parameters

    • gatewayHost: string
    • tenantId: string

    Returns Future<SystemContext>

openRedirection

performLaunchAction

Private performLaunchActionOnline

refreshContext

Private setAppContextStateToLoggedIn

  • Parameters

    Returns void

Private setAppContextStateToLoggedOut

  • setAppContextStateToLoggedOut(): void
  • Returns void

Generated using TypeDoc