public final class

LicenseImpl

extends Object
java.lang.Object
   ↳ com.esri.core.runtime.LicenseImpl

Class Overview

This class wraps the runtime core license api.

Summary

Public Constructors
LicenseImpl()
Public Methods
String generateLicenseInfo(boolean onPremise, long expiryDate)
Generate a license info string.
Date getExpiry()
Gets the expiry of the current license.
LicenseLevel getLicenseLevel()
Gets the license level.
void resetToBasic()
Reset the license level to basic.
LicenseResult setExtensionLicense(String[] extensionLicenses)
Use to validate the given collection of local server extension license strings.
LicenseResult setLicense(String licenseString)
Authenticate the runtime using a license string.
LicenseResult setLicense(LicenseInfo licenseInfo)
Authenticate the runtime using a LicenseInfo instance obtained by logging in to a portal.
LicenseResult validateAndSetClientID(String clientId)
Validate and set client id to set the license level to basic.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public LicenseImpl ()

Public Methods

public String generateLicenseInfo (boolean onPremise, long expiryDate)

Generate a license info string. This can be used to create a new LicenseInfo instance by calling fromJson(String)

Parameters
onPremise boolean: true for an on premise portal, false otherwise
expiryDate long: the portal subscription expiry date
Returns
String the string

public Date getExpiry ()

Gets the expiry of the current license. When authenticating with a LicenseInfo instance, this will be 30 days from the time the instance was first created. When authenticating with a license string this will generally return the maximum date, essentially no expiry. If the license string does have an expiry date, this will return that date.

Returns
Date the expiry

public LicenseLevel getLicenseLevel ()

Gets the license level.

Returns
LicenseLevel the license level

public void resetToBasic ()

Reset the license level to basic.

public LicenseResult setExtensionLicense (String[] extensionLicenses)

Use to validate the given collection of local server extension license strings. This is not used by Android.

Parameters
extensionLicenses String: the extension licenses
Returns
LicenseResult the license result

public LicenseResult setLicense (String licenseString)

Authenticate the runtime using a license string. This will set the license level to standard.

Parameters
licenseString String: the license string
Returns
LicenseResult the license result

public LicenseResult setLicense (LicenseInfo licenseInfo)

Authenticate the runtime using a LicenseInfo instance obtained by logging in to a portal. This will set the license level to standard.

Parameters
licenseInfo LicenseInfo: the license info
Returns
LicenseResult the license result

public LicenseResult validateAndSetClientID (String clientId)

Validate and set client id to set the license level to basic.

Parameters
clientId String: the client id
Returns
LicenseResult the license result