iText Licensing Library 4.2.2 API
iText.Licensing.Base.LicenseKey Class Reference

An entry point for license files management. More...

Static Public Member Functions

static void  Initialize ()
 
static void  UnloadLicenses ()
  Unload all licenses for all products. More...
 
static void  UnloadLicenseForProduct (String productName)
  Unloads license for specific product. More...
 
static void  LoadLicenseFile (FileInfo licenseFile)
  Loads a license file or array of licenses from a System.IO.FileInfo. More...
 
static void  LoadLicenseFile (Stream licenseIs)
  Loads a license file or array of licenses using an System.IO.Stream. More...
 
static IList< LicenseInfo GetLoadedLicensesInfo ()
  Gets info about loaded licenses. More...
 
static LicenseInfo  GetLoadedLicenseInfo (String productName, bool checkingForUpdates)
  Gets info about loaded license for provided product name. More...
 
static LicenseInfo  GetLoadedLicenseInfo (String productName)
  Gets info about loaded license for provided product name, trying to update the license. More...
 

Detailed Description

An entry point for license files management.

Member Function Documentation

◆ GetLoadedLicenseInfo() [1/2]

static LicenseInfo iText.Licensing.Base.LicenseKey.GetLoadedLicenseInfo ( String  productName )
inlinestatic

Gets info about loaded license for provided product name, trying to update the license.

Parameters
productName the product name
Returns
the loaded license info which corresponds to the passed product name, or null if there is no license

◆ GetLoadedLicenseInfo() [2/2]

static LicenseInfo iText.Licensing.Base.LicenseKey.GetLoadedLicenseInfo ( String  productName,
bool  checkingForUpdates 
)
inlinestatic

Gets info about loaded license for provided product name.

Parameters
productName the product name
checkingForUpdates flag that specifies if updates need to be checked
Returns
the loaded license info which corresponds to the passed product name, or null if there is no license

◆ GetLoadedLicensesInfo()

static IList<LicenseInfo> iText.Licensing.Base.LicenseKey.GetLoadedLicensesInfo ( )
inlinestatic

Gets info about loaded licenses.

Returns
list with loaded license info, or empty list if there is no licenses

◆ LoadLicenseFile() [1/2]

static void iText.Licensing.Base.LicenseKey.LoadLicenseFile ( FileInfo  licenseFile )
inlinestatic

Loads a license file or array of licenses from a System.IO.FileInfo.

Loads a license file or array of licenses from a System.IO.FileInfo. It is expected that file contains license as json object or json array of such licenses. The certificate is read from the jar.

Note that method does not perform any additional checks and does not consider license files loading as a transaction. If any error occurs, on loading array of licenses method execution will be stopped but already loaded licenses will not be unloaded.

Parameters
licenseFile the file to load license

◆ LoadLicenseFile() [2/2]

static void iText.Licensing.Base.LicenseKey.LoadLicenseFile ( Stream  licenseIs )
inlinestatic

Loads a license file or array of licenses using an System.IO.Stream.

Loads a license file or array of licenses using an System.IO.Stream. It is expected that input stream contains license as json object or json array of such licenses. The certificate is read from the jar.

Note that method does not perform any additional checks and does not consider license files loading as a transaction. If any error occurs, on loading array of licenses method execution will be stopped but already loaded licenses will not be unloaded.

Parameters
licenseIs the input stream for load license

◆ UnloadLicenseForProduct()

static void iText.Licensing.Base.LicenseKey.UnloadLicenseForProduct ( String  productName )
inlinestatic

Unloads license for specific product.

Parameters
productName the name of the product for which license will be unloaded

◆ UnloadLicenses()

static void iText.Licensing.Base.LicenseKey.UnloadLicenses ( )
inlinestatic

Unload all licenses for all products.