Show / Hide Table of Contents

Class NSLicenseAgent

License query, download, activation.

Syntax
Examples
NSLicenseAgent agent;
agent.callMethod(arg1, arg2);

Constructors

NSLicenseAgent()

License query, download, activation.

Introduced or updated in version: 7

Declaration
NSLicenseAgent
Examples
NSLicenseAgent agent;
agent.callMethod(arg1, arg2);

Methods

ActivateLicenseInfo(NSExtendedLicenseInfo)

Saves a new license to the database.

Introduced or updated in version: 7

Declaration
NSLicenseResult ActivateLicenseInfo(NSExtendedLicenseInfo newLicense)
Parameters
Type Name Description
NSExtendedLicenseInfo newLicense
Returns
Type Description
NSLicenseResult

AddLicenseFromFile(String)

Loads and activates a new license from file/string if the new license is valid.

Introduced or updated in version: 8.2

Declaration
NSExtendedLicenseInfo AddLicenseFromFile(String fileContent)
Parameters
Type Name Description
String fileContent
Returns
Type Description
NSExtendedLicenseInfo
Examples
NSLicenseAgent agent;
String fileContent;
NSExtendedLicenseInfo res = agent.AddLicenseFromFile(fileContent);

AssignThirdPartyLicenses(Integer,String,String[])

Assigns third party licenses

Introduced or updated in version: 8.2

Declaration
NSModuleLicenseLink[] AssignThirdPartyLicenses(Integer associateId, String moduleOwner, String[] moduleLicenseNames)
Parameters
Type Name Description
Integer associateId
String moduleOwner
String[] moduleLicenseNames
Returns
Type Description
NSModuleLicenseLink[]
Examples
NSLicenseAgent agent;
Integer associateId;
String moduleOwner;
String[] moduleLicenseNames;
NSModuleLicenseLink[] res = agent.AssignThirdPartyLicenses(associateId, moduleOwner, moduleLicenseNames);

ChangeSerialNumber(String,String)

Changes the new serial number for the installation. Requests a new license from SuperLicense, checks if change is authorized.

Introduced or updated in version: 7

Declaration
NSLicenseResult ChangeSerialNumber(String newCompanyName, String newSerialNumber)
Parameters
Type Name Description
String newCompanyName
String newSerialNumber
Returns
Type Description
NSLicenseResult
Examples
NSLicenseAgent agent;
String newCompanyName;
String newSerialNumber;
NSLicenseResult res = agent.ChangeSerialNumber(newCompanyName, newSerialNumber);

GetLicenseForAllOwnersFromDB()

Gets all licenses, with usage, from all module owners as they are stored in the database

Introduced or updated in version: 7

Declaration
NSExtendedLicenseInfo[] GetLicenseForAllOwnersFromDB()
Returns
Type Description
NSExtendedLicenseInfo[]

GetLicenseFromDB(String)

Gets license, with usage, as it is stored in the database for one particular module owner.

Introduced or updated in version: 7

Declaration
NSExtendedLicenseInfo GetLicenseFromDB(String ownerName)
Parameters
Type Name Description
String ownerName
Returns
Type Description
NSExtendedLicenseInfo
Examples
NSLicenseAgent agent;
String ownerName;
NSExtendedLicenseInfo res = agent.GetLicenseFromDB(ownerName);

GetLicenseFromFile(String)

Loads a new license from file

Introduced or updated in version: 7

Declaration
NSExtendedLicenseInfo GetLicenseFromFile(String fileContent)
Parameters
Type Name Description
String fileContent
Returns
Type Description
NSExtendedLicenseInfo

GetLicenseFromLicenseServer(String)

Introduced or updated in version: 7

Declaration
NSExtendedLicenseInfo GetLicenseFromLicenseServer(String ownerName)
Parameters
Type Name Description
String ownerName
Returns
Type Description
NSExtendedLicenseInfo

GetLicenseStatusFromLicenseServer(String)

Gets license information from the license server for a particular module owner.

Introduced or updated in version: 7

Declaration
NSCheckLicenseStatusResult GetLicenseStatusFromLicenseServer(String ownerName)
Parameters
Type Name Description
String ownerName
Returns
Type Description
NSCheckLicenseStatusResult
Examples
NSLicenseAgent agent;
String ownerName;
NSCheckLicenseStatusResult res = agent.GetLicenseStatusFromLicenseServer(ownerName);

GetModuleLicenseFromDB(String,String)

Gets license information for one particular license module.

Introduced or updated in version: 8.2

Declaration
NSModuleLicense GetModuleLicenseFromDB(String ownerName, String moduleName)
Parameters
Type Name Description
String ownerName
String moduleName
Returns
Type Description
NSModuleLicense
Examples
NSLicenseAgent agent;
String ownerName;
String moduleName;
NSModuleLicense res = agent.GetModuleLicenseFromDB(ownerName, moduleName);

GetModuleLicenseHistoryFromLicenseServer(NSExtendedLicenseInfo,NSExtendedModuleLicense)

Gets details about a license from the license server.

Introduced or updated in version: 7

Declaration
String GetModuleLicenseHistoryFromLicenseServer(NSExtendedLicenseInfo licenseInfo, NSExtendedModuleLicense moduleLicense)
Parameters
Type Name Description
NSExtendedLicenseInfo licenseInfo
moduleLicense
Returns
Type Description
String
Examples
NSLicenseAgent agent;
NSExtendedLicenseInfo licenseInfo;
NSExtendedModuleLicense moduleLicense;
String res = agent.GetModuleLicenseHistoryFromLicenseServer(licenseInfo, moduleLicense);

GetSatelliteLicenses(Integer)

Obtains information about satellite module licenses

Introduced or updated in version: 7

Declaration
NSLicenseOwner[] GetSatelliteLicenses(Integer satelliteId)
Parameters
Type Name Description
Integer satelliteId
Returns
Type Description
NSLicenseOwner[]
Examples
NSLicenseAgent agent;
Integer satelliteId;
NSLicenseOwner[] res = agent.GetSatelliteLicenses(satelliteId);

GetShopUrl(String)

Gets the shop URL for the specified module owner.

Introduced or updated in version: 7.5

Declaration
String GetShopUrl(String ownerName)
Parameters
Type Name Description
String ownerName
Returns
Type Description
String
Remarks

This can be used to redirect user to the web shop.

Examples
NSLicenseAgent agent;
String ownerName;
String res = agent.GetShopUrl(ownerName);

GetThirdPartyLicenseAssignments(Integer,String)

Gets license assignments for an associate for licenses belonging to an other module owner than SuperOffice

Introduced or updated in version: 8.2

Declaration
NSModuleLicenseLink[] GetThirdPartyLicenseAssignments(Integer associateId, String moduleOwner)
Parameters
Type Name Description
Integer associateId
String moduleOwner
Returns
Type Description
NSModuleLicenseLink[]
Examples
NSLicenseAgent agent;
Integer associateId;
String moduleOwner;
NSModuleLicenseLink[] res = agent.GetThirdPartyLicenseAssignments(associateId, moduleOwner);

GetUserLicenses(Integer)

Obtains information about associate module licenses

Introduced or updated in version: 7

Declaration
NSLicenseOwner[] GetUserLicenses(Integer associateId)
Parameters
Type Name Description
Integer associateId
Returns
Type Description
NSLicenseOwner[]
Examples
NSLicenseAgent agent;
Integer associateId;
NSLicenseOwner[] res = agent.GetUserLicenses(associateId);

GetUserLicensesMDOList()

Gets all licenses in an NSMDOListItem structure.

Introduced or updated in version: 7.5

Declaration
NSSelectableMDOListItem[] GetUserLicensesMDOList()
Returns
Type Description
NSSelectableMDOListItem[]
Examples
NSLicenseAgent agent;
NSSelectableMDOListItem[] res = agent.GetUserLicensesMDOList();

RemoveLicenseFromDB(String)

Removes the license from a particular module owner from the database.

Introduced or updated in version: 7

Declaration
NSLicenseResult RemoveLicenseFromDB(String moduleOwner)
Parameters
Type Name Description
String moduleOwner
Returns
Type Description
NSLicenseResult
Remarks

It is not permitted to remove licenses from SuperOffice

UnassignThirdPartyLicenses(Integer,String,String[])

Unassigns (removes) third-party licenses

Introduced or updated in version: 8.2

Declaration
NSModuleLicenseLink[] UnassignThirdPartyLicenses(Integer associateId, String moduleOwner, String[] moduleLicenseNames)
Parameters
Type Name Description
Integer associateId
String moduleOwner
String[] moduleLicenseNames
Returns
Type Description
NSModuleLicenseLink[]
Examples
NSLicenseAgent agent;
Integer associateId;
String moduleOwner;
String[] moduleLicenseNames;
NSModuleLicenseLink[] res = agent.UnassignThirdPartyLicenses(associateId, moduleOwner, moduleLicenseNames);

ValidateLicenseInfo(NSExtendedLicenseInfo)

Validates that a license is consistent.

Introduced or updated in version: 7

Declaration
NSLicenseResult ValidateLicenseInfo(NSExtendedLicenseInfo licenseInfo)
Parameters
Type Name Description
NSExtendedLicenseInfo licenseInfo
Returns
Type Description
NSLicenseResult
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top