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.

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

Methods

ActivateLicenseInfo(NSExtendedLicenseInfo)

Saves a new license to the database.

Declaration
NSLicenseResult ActivateLicenseInfo(NSExtendedLicenseInfo newLicense)
Parameters
Type Name Description
NSExtendedLicenseInfo newLicense
Returns
Type Description
NSLicenseResult
Examples
NSLicenseAgent agent;
agent.callMethod(arg1, arg2);

AddLicenseFromFile(String)

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

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

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.

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

Declaration
NSExtendedLicenseInfo[] GetLicenseForAllOwnersFromDB()
Returns
Type Description
NSExtendedLicenseInfo[]
Examples
NSLicenseAgent agent;
agent.callMethod(arg1, arg2);

GetLicenseFromDB(String)

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

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

Declaration
NSExtendedLicenseInfo GetLicenseFromFile(String fileContent)
Parameters
Type Name Description
String fileContent
Returns
Type Description
NSExtendedLicenseInfo
Examples
NSLicenseAgent agent;
agent.callMethod(arg1, arg2);

GetLicenseFromLicenseServer(String)

License query, download, activation.

Declaration
NSExtendedLicenseInfo GetLicenseFromLicenseServer(String ownerName)
Parameters
Type Name Description
String ownerName
Returns
Type Description
NSExtendedLicenseInfo
Examples
NSLicenseAgent agent;
agent.callMethod(arg1, arg2);

GetLicenseStatusFromLicenseServer(String)

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

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.

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.

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

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.

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

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

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.

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.

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

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

UnassignThirdPartyLicenses(Integer,String,String[])

Unassigns (removes) third-party licenses

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.

Declaration
NSLicenseResult ValidateLicenseInfo(NSExtendedLicenseInfo licenseInfo)
Parameters
Type Name Description
NSExtendedLicenseInfo licenseInfo
Returns
Type Description
NSLicenseResult
Examples
NSLicenseAgent agent;
agent.callMethod(arg1, arg2);
In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top