Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Server

Index

Functions

getAllIdentityProvidersById

  • JMap.Server.getAllIdentityProvidersById

    Returns all the Identity Provider supported by the system, in an object keyed by provider Id

    throws

    if the server is not ready (info from server has not been fetched). Call JMap.Server.isReady() to know this information.

    example
    
    console.log(JMap.Server.getAllIdentityProvidersById())
    // {idp-0: {id: "idp-0", loginUrl: "https://[...]", ...}, ... }

    Returns JServerIdentityProviderById

getIdentityProviderById

  • JMap.Server.getIdentityProviderById

    Returns the specified Identity Provider. Provider Ids can be derived from JMap.Server.getAllIdentityProvidersById

    throws

    if specified provider id is not valid or not found, or if the server is not ready (info from server has not been fetched). Call JMap.Server.isReady() to know this information.

    example
    
    console.log(JMap.Server.getIdentityProviderById("idp-1"))
    // {id: "idp-0", loginUrl: "https:// ....", ......}

    Parameters

    • providerId: string

      the provider identity id

    Returns JServerAnyIdentityProvider

getMinimumVersion

  • JMap.Server.getMinimumVersion

    Returns the minimum server version required by NG to work fine.

    throws

    if the server is not ready (info from server has not been fetched). Call JMap.Server.isReady() to know this information.

    example
    
    // returns the minimum server version required by NG to work fine
    JMap.Server.getMinimumVersion()

    Returns JMinimumServerVersion

getShortVersion

  • getShortVersion(): string
  • JMap.Server.getShortVersion

    Returns a normalized string identifying the major version of the JMap Server to which JMap NG is currently connected to. Returns an empty string if the server is not yet connected.

    throws

    if the server is not ready (info from server has not been fetched). Call JMap.Server.isReady() to know this information.

    example
    
    console.log(JMap.Server.getShortVersion())
    // "7_jakarta"

    Returns string

getType

  • JMap.Server.getType

    Returns the server type.

    throws

    if the server is not ready (info from server has not been fetched). Call JMap.Server.isReady() to know this information.

    example
    
    // display the server type, "legacy" (JMap 7) or "saas" (JMap Cloud)
    console.log(`Server type is "${JMap.Server.getType()}"`)

    Returns JSERVER_TYPES

getVersion

  • JMap.Server.getVersion

    Returns the server version.

    throws

    if the server is not ready (info from server has not been fetched). Call JMap.Server.isReady() to know this information.

    example
    
    // display the server version
    console.log("Server version:", JMap.Server.getVersion())

    Returns JServerVersion

isLegacy

  • isLegacy(): boolean
  • JMap.Server.isLegacy

    Returns true if the server is a JMap 7 instance.

    throws

    if the server is not ready (info from server has not been fetched). Call JMap.Server.isReady() to know this information.

    example
    
    // display the type of server
    console.log(`Server type is "${JMap.Server.isLegacy() ? 'JMap 7' : 'JMap Cloud'}"`)

    Returns boolean

isMinimumVersionRespected

  • isMinimumVersionRespected(serverInfo?: JServerInfo): boolean
  • JMap.Server.isMinimumVersionRespected

    Returns true if the current version of the server is lower than the minimum server version required by NG.

    example
    
    // Returns true if current server version is greater or equals than minimum server version
    JMap.Server.isMinimumVersionRespected()

    Parameters

    • Optional serverInfo: JServerInfo

      if not passed will use the current one

    Returns boolean

isReady

  • isReady(): boolean
  • JMap.Server.isReady

    Returns a string identifying the full version of the JMap Server to which JMap NG is currently connected to. Returns an empty string if the server is not yet connected.

    example
    
    // display in the console if the server is ready or not
    console.log(JMap.Server.isReady() ? "Server is ready" : "Server is not ready")

    Returns boolean

isSaas

  • isSaas(): boolean
  • JMap.Server.isSaas

    Returns true if the server is a JMap Cloud instance.

    throws

    if the server is not ready (info from server has not been fetched). Call JMap.Server.isReady() to know this information.

    example
    
    // display the type of server
    console.log(`Server type is "${JMap.Server.isSaas() ? 'JMap Cloud' : 'JMap 7'}"`)

    Returns boolean

isStandardLoginAvailable

  • isStandardLoginAvailable(): boolean
  • JMap.Server.isStandardLoginAvailable

    Returns true is the standard JMap User Manager is available for authentication, false otherwise.

    throws

    if the server is not ready (info from server has not been fetched). Call JMap.Server.isReady() to know this information.

    example
    
    console.log(JMap.Server.isStandardLoginAvailable())
    // true

    Returns boolean