Atalasoft MobileImage API Reference
Classes | Static Public Member Functions | List of all members
com.kofax.kmc.kut.utilities.Licensing Class Reference

This class comprises the licensing mechanism for Mobile SDK. More...

Classes

enum  LicenseServerType
 An enum of license server types. Use with Licensing.setMobileSDKLicenseServer. More...
 
enum  LicenseType
 An enum of license types. More...
 
interface  VolumeLicenseEventListener
 The listener interface for receiving volume licensing events. More...
 
class  VolumeLicenseFailureData
 Data class for volume licensing related failures. More...
 
class  VolumeLicenseResultData
 Data class for volume licensing related successful operations. More...
 

Static Public Member Functions

static int getDaysRemaining ()
 Retrieve the number of days remaining in current license. More...
 
static ErrorInfo setMobileSDKLicense (String licenseStr)
 Set the Mobile SDK license. More...
 
static ErrorInfo setMobileSDKLicenseServer (String licenseServerName, LicenseServerType licenseServerType)
 Set the Mobile SDK license server name. More...
 
static boolean isSdkLicensed (LicenseType licenseType)
 Find out if specified license type is valid with current license. More...
 
static void acquireVolumeLicenses (LicenseType licenseType, int count)
 Pre-allocate units of the specified volume license type. More...
 
static int getRemainingLicenseCount (LicenseType licenseType)
 Get the number of license volume units available on the device. More...
 
static void addVolumeLicenseEventListener (VolumeLicenseEventListener listener)
 Add the specified VolumeLicenseEventListener to receive VolumeLicenseEvents. More...
 
static void removeVolumeLicenseEventListener (VolumeLicenseEventListener listener)
 Removes the specified VolumeLicenseEventListener. More...
 
static void setCertificateValidatorListener (CertificateValidatorListener certificateValidatorListener)
 

Detailed Description

This class comprises the licensing mechanism for Mobile SDK.

Call the setMobileSDKLicense method with a valid license string to get access to full Mobile SDK functionality.

Member Function Documentation

static void com.kofax.kmc.kut.utilities.Licensing.acquireVolumeLicenses ( LicenseType  licenseType,
int  count 
)
inlinestatic

Pre-allocate units of the specified volume license type.

This license operation is asynchronous and the method returns immediately. To process the license event, including any errors, implement the VolumeLicenseEventListener interface in a class object and then register that object using the addVolumeLicenseEventListener method. Once the operation is complete, remove the listener. (Outstanding license usage will be reported to the server when server connection is available.)

Parameters
licenseTypetype of volume license requested, LicenseType.ID_EXTRACTION is the only type supported.
countnumber of volume units requested
static void com.kofax.kmc.kut.utilities.Licensing.addVolumeLicenseEventListener ( VolumeLicenseEventListener  listener)
inlinestatic

Add the specified VolumeLicenseEventListener to receive VolumeLicenseEvents.

This method must be called to establish one or more application listeners. These listeners receive events indicating status of a volume license event.

Exceptions
NullPointerException
static int com.kofax.kmc.kut.utilities.Licensing.getDaysRemaining ( )
inlinestatic

Retrieve the number of days remaining in current license.

Returns
The number of days remaining in the current license.
static int com.kofax.kmc.kut.utilities.Licensing.getRemainingLicenseCount ( LicenseType  licenseType)
inlinestatic

Get the number of license volume units available on the device.

This method returns the number of license volume units available on the device for the specified license type. LicenseType.ID_EXTRACTION is the only type supported. Any other license type will return 0 units available. Also, if the licenseServerHostname has not been set, this method will return 0 units available.

Parameters
licenseTypetype of license to check
Returns
number of license volume units available
static boolean com.kofax.kmc.kut.utilities.Licensing.isSdkLicensed ( LicenseType  licenseType)
inlinestatic

Find out if specified license type is valid with current license.

Returns an indication of whether or not the specified license type is included in the license string that was previously passed to setMobileSDKLicense. Also returns false if a license string was never set.

Returns
true or false.
static void com.kofax.kmc.kut.utilities.Licensing.removeVolumeLicenseEventListener ( VolumeLicenseEventListener  listener)
inlinestatic

Removes the specified VolumeLicenseEventListener.

static void com.kofax.kmc.kut.utilities.Licensing.setCertificateValidatorListener ( CertificateValidatorListener  certificateValidatorListener)
inlinestatic

Setter for certificate validator listener. The listener receives certificate validation challenge in response to an authentication request from the remote server.

See also
CertificateValidatorListener
Parameters
certificateValidatorListener
static ErrorInfo com.kofax.kmc.kut.utilities.Licensing.setMobileSDKLicense ( String  licenseStr)
inlinestatic

Set the Mobile SDK license.

This method sets the Mobile SDK license and populates the days remaining.

Parameters
licenseStrThe license string to set.
Returns
Status code
Return values
KMC_SUCCESS
KMC_EV_LICENSINGinvalid license
KMC_EV_LICENSE_EXPIRED
static ErrorInfo com.kofax.kmc.kut.utilities.Licensing.setMobileSDKLicenseServer ( String  licenseServerName,
LicenseServerType  licenseServerType 
)
inlinestatic

Set the Mobile SDK license server name.

This method sets the Mobile SDK license server name and type. (Outstanding license usage will be reported to the server when server connection is available.)

Parameters
licenseServerNamelicense server name.
licenseServerTypelicense server type.
Returns
Status code (normally KMC_SUCCESS)

For RTTI servers, the server name would typically look like

http://my-server-here/mobilesdk

For TotalAgility servers, the server name would typically look like

http://my-server-here/totalagility

The documentation for this class was generated from the following file:
Untitled Document © 2016 Atalasoft, Inc., 116 Pleasant St, Suite 321, Easthampton, MA 01027, U.S.A. All rights reserved. Use is subject to license terms.