Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

Events

Properties

Methods

Constructors

constructor

  • new ViewerApplication(configObject: any, hostElement?: HTMLElement, id?: string, configTokens?: object, debug?: string | boolean): ViewerApplication
  • Parameters

    • configObject: any
    • Optional hostElement: HTMLElement
    • Optional id: string
    • Optional configTokens: object
      • [token: string]: string
    • Optional debug: string | boolean

    Returns ViewerApplication

Events

onLibrariesDownloaded

  • Occurs when all libraries for this application have been processed. Invoked even if one or more libraries failed to download. To check if a specific library has successfully downloaded, use the hasLibrary function or check the libraries array on the app.

    Parameters

    • app: Application

      A {@link geocortex.framework.application.Application}.

    Returns void

Properties

Private _debug

_debug: any

Private _hasShell

_hasShell: boolean

Private _internalDebugEnabled

_internalDebugEnabled: boolean

Protected _resourceDictionaries

_resourceDictionaries: object

A collection of resource dictionaries, keyed by locale

Type declaration

  • [key: string]: any

Private _shellStabilized

_shellStabilized: boolean

abortInitialization

abortInitialization: boolean

Aborts initialization of the application. This is useful for preventing unnecessary processing of configuration or library code in the case that an OAuth style authentication redirect is needed, or an erroneous condition will prevent the app and initialization should be completely aborted.

accessibilityManager

accessibilityManager: AccessibilityManager

allLibrariesLoaded

allLibrariesLoaded: boolean

Indicates whether or not all libraries have been loaded.

allowCrossDomainConfig

allowCrossDomainConfig: boolean

Whether or not configuration can be loaded from other domains. If this is set to true, the application proxy will be used.

applicationReady

applicationReady: boolean

This will be set to true when the application is ready to go, and external clients can run code that manipulates the UI

behavior

behavior: BehaviorBase

behaviorRegistry

behaviorRegistry: BehaviorRegistry

An instance of {@link behaviors.BehaviorRegistry} used to manage behaviours. See {@link behaviors.Behavior}.

bookmarks

bookmarks: BookmarkManager

clickableGraphics

clickableGraphics: ClickableGraphicsRegistry

command

commandRegistry

commandRegistry: CommandRegistry

An instance of {@link commands.CommandRegistry} used to manage and invoke named commands. See {@link commands.Command}.

configModel

configModel: ConfigurationModel

The object used to provide the application with configuration, if specified.

configPreprocessor

configPreprocessor: function

An optional configuration preprocessor - a function to process the configuration in place before parsing and loading. After initialization, this is nulled out.

Type declaration

    • (configObject: any): void
    • Parameters

      • configObject: any

      Returns void

configTokens

configTokens: object

Named configuration tokens for injection into JSON configuration. In configuration, tokens are wrapped by brackets like so:

{{TokenKey}}

When the application processes configuration, it will populate these token values according to the name/value pairs in configTokens. Note that configuration tokens can only be used as JSON values and not keys.

"siteUri": "sites/{{SiteName}}"

Type declaration

  • [key: string]: string

configUri

configUri: string

The URI of a JSON configuration block that was used to intialize the application, if it was specified.

configuration

configuration: ApplicationJson

Application-wide configuration available to all components. This is defined in the application section of configuration.

coordinatesManager

coordinatesManager: CoordinatesManager

dataFrameIsOpen

dataFrameIsOpen: boolean

Keeps track of whether the data frame is open so that deferred modules can properly populate initial state

debugMode

debugMode: string | boolean

Whether or not the app is in "debug mode", enabling arbitrary debug functionality. Setting debugMode to true in basic Framework applications will cause the data-binding engine to leave data-binding statements in the DOM (for inspection purposes). Additional granuality can be provided by providing a text value along with the URL parameter. Current supported modes are 'gvh','event','command' and 'view'. These can be concatenated in a string, or use 'debugMode=all' to turn everything on.

defaultContentPolicy

defaultContentPolicy: ContentPolicy

developmentMode

developmentMode: boolean

Whether or not the application is in development/debug mode. When an application is in development mode, certain runtime behaviour may differ from when not in development mode. This is a somewhat abritrary flag in place as single, unified application flag.

event

eventRegistry

eventRegistry: EventRegistry

An instance of {@link events.EventRegistry} used to manage and dispatch named events. See {@link events.Event}.

featureSetManager

featureSetManager: FeatureSetManager

highlightManager

highlightManager: HighlightManager

host

host: string

The path of the hosted address of this application, not including the file portion, e.g. "http://localhost/my/app"

id

id: string

The ID of the application. This is used for keying application-wide resources, for example when using the {@link storage.Store} to store data. It should be a simple string key with no spaces or special characters.

initialShellHeight

initialShellHeight: number

initialShellWidth

initialShellWidth: number

initialStateAppliedCallback

initialStateAppliedCallback: function

Invoked when the initial state for all modules has been applied.

Type declaration

initializationCompleteCallback

initializationCompleteCallback: function

Invoked when the application has downloaded all libraries and finished initializing.

Type declaration

isArcGisWebApp

isArcGisWebApp: boolean

isHttpsMode

isHttpsMode: boolean

Whether or not the application was served via HTTPS.

isNative

isNative: Observable<boolean>

Indicates whether or not the application is functioning in some sort of enhanced native container, e.g. within some native application container or framework.

isOffline

isOffline: Observable<boolean>

Indicates whether or not the application is functioning in an offline mode. Setting this Observable changes the online/offline state of the application (for applications with offline capabilities).

isShuttingDown

isShuttingDown: boolean

Is the application in the middle of the shutdown process?

layerList

layerList: LayerList

localServerAddress

localServerAddress: string

Indicates the address of the native layer, if the web app has been loaded within a GMAF instance

localServerNamespace

localServerNamespace: string

The namespace for accessing data for a particular app.

localServerToken

localServerToken: string

An access token which needs to be provided in order to access any of the local server endpoints.

locale

locale: string

map

map: Map

markupLayer

markupLayer: Observable<GraphicsLayer>

menuRegistry

menuRegistry: MenuRegistry

modalRegionSingleton

modalRegionSingleton: PopupModalRegionAdapter

An application-wide instance of a {@link ui.RegionAdapterBase} that creates and manages a modal popup.

moduleManager

moduleManager: ModuleManager

An instance of ModuleManager used to manage application modules.

nativeManager

nativeManager: NativeManager

offlineManager

offlineManager: OfflineManager

project

proxyUri

proxyUri: string

An optional proxy URI to use.

searchManager

searchManager: SearchManager

shellName

shellName: "Desktop" | "Tablet" | "Handheld"

Name of the current shell

site

site: Site

stateManager

stateManager: StateManager

store

store: Store

A {@link geocortex.framework.storage.Store} to manage and facilitate storage of local data, particularly for offline use,.

toolRegistry

toolRegistry: ToolRegistry

toolbarGroupRegistry

toolbarGroupRegistry: ToolbarGroupRegistry

trace

trace: Trace

The instance of a {@link geocortex.framework.utils.Trace} facility used by this application instance.

undoManager

undoManager: UndoManager

urlParameters

urlParameters: object

An object containing the URL parameters passed into the application.

Type declaration

  • [key: string]: string

version

version: string

viewManager

viewManager: ViewManager

The {@link geocortex.framework.ui.ViewManager} instance used to manage hierarchies of regions and views.

viewerConfigPath

viewerConfigPath: string

viewerReadyTime

viewerReadyTime: number

viewerStartTime

viewerStartTime: number

Used by Analytics to track viewer startup times

webMap

Methods

Protected _executeOpenWebPage

  • _executeOpenWebPage(argument: string | object | object): boolean
  • Parameters

    • argument: string | object | object

    Returns boolean

Protected _registerApplicationLevelCommands

  • _registerApplicationLevelCommands(): void
  • Returns void

Protected addNativeReadyFunction

  • addNativeReadyFunction(callback: function): void

awaitModuleForView

  • awaitModuleForView(viewId: string): Promise<any>
  • Returns a promise that will be resolved when a module providing a particular view is loaded. If the module is loaded already the promise resolves immediately.

    Parameters

    • viewId: string

    Returns Promise<any>

awaitModules

  • awaitModules(moduleNames: string[]): Promise<any>
  • Wait for the specified collection of modules to load. Resolves immediately if the modules are loaded or do not exist.

    Parameters

    • moduleNames: string[]

    Returns Promise<any>

awaitModulesForCommand

  • awaitModulesForCommand(commandName: string): Promise<any>
  • Returns a promise that will be resolved when all deferred modules providing command fragments for a command are loaded. If all the modules are loaded already the promise resolves immediately.

    Parameters

    • commandName: string

    Returns Promise<any>

debugModeActive

  • debugModeActive(mode: string): boolean
  • Helper method to determine if a certain debug mode is currently active.

    Parameters

    • mode: string

      String representing the mode to check

    Returns boolean

doIfSiteInitializationFails

  • doIfSiteInitializationFails(args: object): void
  • Supply callbacks to execute if site initialization fails. Supply 'initFailCallback' only to run the same routine on all types of failure, or optionally also supply 'authFailCallback' Using this method is preferable to listening to the events directly as there is no chance of missing them.

    Parameters

    • args: object

      An object containing an 'initFailCallback' and optionally also an 'authFailCallback'

      • Optional authFailCallback?: function
          • (): void
          • Returns void

      • initFailCallback: function
          • (): void
          • Returns void

      • Optional serviceLayerFailCallback?: function
          • (): void
          • Returns void

    Returns void

doWhenMapInitialized

  • doWhenMapInitialized(action: function): void
  • Runs the callback when the map is initialized and the site service layers have been loaded

    Parameters

    • action: function
        • (): void
        • Returns void

    Returns void

fetchConfigResource

  • fetchConfigResource(args: object): any
  • Fetches a configuration resource, provided it comes from the same domain or a whitelisted domain.

    Parameters

    • args: object

      Arguments containing a URL to fetch. These will be passed directly into an XmlHttpRequest via dojo.xhrGet.

      • Optional error?: function
          • (param: any): void
          • Parameters

            • param: any

            Returns void

      • Optional load?: function
          • (param: any): void
          • Parameters

            • param: any

            Returns void

      • url: string

    Returns any

followNavigationLink

  • followNavigationLink(args: object): boolean
  • Parameters

    • args: object
      • element: HTMLAnchorElement
      • url: string

    Returns boolean

freeAllFrameworkObjects

  • freeAllFrameworkObjects(): void

getFrameworkObjectById

getFrameworkObjectByIdAsync

  • getFrameworkObjectByIdAsync(id: any, callback: function, errBack?: function): void
  • System-wide method to get a FrameworkObject by ID asynchronously whenever it's registered with this application

    Parameters

    • id: any

      The ID of the object to fetch.

    • callback: function
    • Optional errBack: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns void

getHostElement

  • getHostElement(): HTMLElement
  • Gets the container element of the application.

    Returns HTMLElement

Protected getInitialState

  • getInitialState(moduleName: string, libraryId: string): Promise<any>
  • Parameters

    • moduleName: string
    • libraryId: string

    Returns Promise<any>

getLibraryOrder

  • getLibraryOrder(libraryId: string): number
  • Returns the order that a library has been configured in.

    Parameters

    • libraryId: string

      The ID of the library.

    Returns number

getResource

  • getResource(libraryId: string, key: string, locale?: string): string
  • Gets a language resource from the Application's resource dictionary, given a library ID, key, and optional locale. Returns null if the resource does not exist.

    Parameters

    • libraryId: string

      The ID of the library the resource is for.

    • key: string

      The resource key.

    • Optional locale: string

      The locale of the resource to fetch. Defaults to the current application locale.

    Returns string

getStashedLogs

  • getStashedLogs(): any[]
  • Return an array of stashed log. This is meant to be called one, since after it is called, it will stop stashing logs. This should be used by the log module.

    Returns any[]

getUri

  • getUri(uriPiece: string): string
  • Returns a URI, using the proxy if configured. Warns when mixed HTTP/HTTPS content is requested.

    todo

    Review if this is used anymore. May be time to deprecate it.

    Parameters

    • uriPiece: string

      A relative or absolute URI to format.

    Returns string

getUrlParameter

  • getUrlParameter(paramName: string): string
  • Returns the url parameter, ignoring case.

    Parameters

    • paramName: string

      The parameter to run a case insensitive search for and retrieve

    Returns string

    The url parameter if found, or null

getWorkflowActivityDispatcher

hasDeferredModule

  • hasDeferredModule(moduleName: string): boolean
  • Given the name of a module that is not present, returns true if this is a module that could be loaded.

    Parameters

    • moduleName: string

    Returns boolean

hasLibrary

  • hasLibrary(libraryId: string): boolean
  • Does a library with this id exist?

    Parameters

    • libraryId: string

    Returns boolean

includeScript

  • includeScript(uri: string, successCallback: function, errorCallback: function): void
  • Includes and runs a script file. Called from '_loadTraditionalLibraries'

    Parameters

    • uri: string
    • successCallback: function

      The callback to fire if the script was successfully served via JSONP.

        • (script: string): void
        • Parameters

          • script: string

          Returns void

    • errorCallback: function

      The callback to fire if any error occurred trying to download the script.

        • (error: Error): void
        • Parameters

          • error: Error

          Returns void

    Returns void

initialize

  • initialize(): void

injectLibraryResources

  • injectLibraryResources(libraryId: string, dictionary: object, locale: string): void
  • Adds the specified library resources for the specified library and locale to the application.

    Parameters

    • libraryId: string

      The ID of the library to inject resources for.

    • dictionary: object

      The dictionary of resources.

      • [key: string]: any
    • locale: string

      The locale of the resources.

    Returns void

instantiateFrameworkObject

  • instantiateFrameworkObject(typeName: string, libraryId: string): any
  • Instantiates a new FrameworkObject, passing in the application instance.

    Parameters

    • typeName: string

      The fully-qualified name of the type to instantiate.

    • libraryId: string

      The ID of the library that this object belongs to.

    Returns any

isHttpsUri

  • isHttpsUri(uri: string): boolean
  • Determines whether or not a URI is HTTPS by looking at the scheme.

    Parameters

    • uri: string

      The URI to test.

    Returns boolean

loadModulesForRegion

  • loadModulesForRegion(regionName: string): void
  • Loads all deferred modules that have views in the specified region that are configured visible. These views will auto-populate the region so there is no need to wait for them.

    Parameters

    • regionName: string

    Returns void

makeAbsolute

  • makeAbsolute(uri: string, appPathOverride?: any): string
  • Given a relative URI, returns an absolute URI based on the application's URI.

    Parameters

    • uri: string

      The relative URI to make absolute.

    • Optional appPathOverride: any

      Optional. Allows you to make the URI absolute using a different URI base.

    Returns string

notifyLibraryDownload

  • notifyLibraryDownload(libraryId: string): void
  • Called by the framework to notify the application that a library has been downloaded.

    Parameters

    • libraryId: string

      The ID of the library that has been downloaded.

    Returns void

Protected onConfigurationLoaded

  • onConfigurationLoaded(configObject: any): void
  • Called immediately after the configuration object has been loaded from JSON, and before any libraries are downloaded. have been downloaded.

    Parameters

    • configObject: any

    Returns void

pendingModulesForCommand

  • pendingModulesForCommand(commandName: string): string[]
  • Return the names of all modules that provide command fragments for this command, and which have not yet been loaded.

    Parameters

    • commandName: string

    Returns string[]

performTokenReplacement

  • performTokenReplacement(value: string): string
  • Takes a string with 0 or more tokens in it, and returns a string with the replacement tokens replaced.

    Parameters

    • value: string

      The string with the replacement tokens in it.

    Returns string

registerActivityIdHandler

  • registerActivityIdHandler(id: string, handler: function): void
  • Parameters

    Returns void

registerActivityTypeHandler

  • registerActivityTypeHandler(typeName: string, handler: function): void
  • Parameters

    Returns void

registerFrameworkObject

setWorkflowActivityDispatcher

shouldOmitStylesForLibrary

  • shouldOmitStylesForLibrary(libraryId: string): boolean
  • Tests whether a not a library should have its styles omitted.

    Parameters

    • libraryId: string

      The ID of the library in question.

    Returns boolean

shutdown

  • shutdown(state: any): void
  • Shuts down the application, releasing all modules, views, bindings, view models, regions, commands, and events.

    Parameters

    • state: any

    Returns void

Private translateConfiguration

  • translateConfiguration(libraryId: string, configuration: any): any
  • Translates configuration, substituting library-specific culture specific strings for the appropriate locale.

    Parameters

    • libraryId: string

      The ID of the library that the module configuration belongs to.

    • configuration: any

      The configuration to translate.

    Returns any

waitUntilAllLibrariesLoaded

  • waitUntilAllLibrariesLoaded(): Promise<void>

waitUntilApplicationReady

  • waitUntilApplicationReady(): Promise<void>
  • Returns a promise that is fulfilled when the application is 'ready'. This means that you can safely run code that manipulates the UI without colliding with any initialization processes. Note that this presumes the existance of a 'Site' as this is what knows when it is ok to fire this event.

    Returns Promise<void>

waitUntilDocumentStoreInitialized

  • waitUntilDocumentStoreInitialized(): Promise<void>
  • Returns a promise that is fulfilled when the Document Store is initialized.

    Returns Promise<void>

waitUntilMapLoaded

  • waitUntilMapLoaded(): Promise<void>
  • Returns a promise that is fulfilled when the esri map is loaded (i.e., the first service layer has been added to the map and its spatial reference set).

    Returns Promise<void>

waitUntilOfflineManagerLoaded

  • waitUntilOfflineManagerLoaded(): Promise<void>
  • Returns a promise that is fulfilled when the OfflineManager is loaded.

    Returns Promise<void>

waitUntilServiceLayerLoaded

  • waitUntilServiceLayerLoaded(serviceLayer: Layer): Promise<void>
  • Returns a promise that is fulfilled when the given service layer has finished loading.

    Parameters

    • serviceLayer: Layer

    Returns Promise<void>

waitUntilShellStabilized

  • waitUntilShellStabilized(): Promise<void>
  • Returns a promise that is fulfilled when the 'shell' is stabilized. Note that the shell might not exist, but we still need to resolve this at a time, so we'll do it when the libraries load.

    Returns Promise<void>

waitUntilSiteDownloaded

  • waitUntilSiteDownloaded(): Promise<void>
  • Returns a promise that is fulfilled when the site object is downloaded.

    Returns Promise<void>

waitUntilSiteInitialized

  • waitUntilSiteInitialized(): Promise<void>
  • Returns a promise that is fulfilled when the Essentials site is initialized.

    Returns Promise<void>

waitUntilSiteInitializing

  • waitUntilSiteInitializing(): Promise<void>
  • Returns a promise that is fulfilled when the Essentials site is available for use.

    Returns Promise<void>

waitUntilSiteServiceLayersLoaded

  • waitUntilSiteServiceLayersLoaded(): Promise<void>
  • Returns a promise that is fulfilled when all service layers in the site have finished loading.

    Returns Promise<void>

waitUntilViewInitialized

  • waitUntilViewInitialized(viewId: string): Promise<ViewBase>
  • Returns a promise that is fulfilled when the view with the given ID is initialized.

    Parameters

    • viewId: string

    Returns Promise<ViewBase>