Show / Hide Table of Contents

Interface ILicenseAgent

Interface for the License Agent License query, download, activation

Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[Agent("License Agent", "Interface for the License Agent. License query, download, activation")]
public interface ILicenseAgent : IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;

using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
   using (LicenseAgent agent = new LicenseAgent())
   {
      // call methods on agent here...
   }
}

Methods

ActivateLicenseInfoAsync(ExtendedLicenseInfo, CancellationToken)

Save a new license to the database.

Declaration
Task<LicenseResult> ActivateLicenseInfoAsync(ExtendedLicenseInfo newLicense, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ExtendedLicenseInfo newLicense

New license to save to the database.

CancellationToken cancellationToken
Returns
Type Description
Task<LicenseResult>

AddLicenseFromFileAsync(string, CancellationToken)

Load and activate a new license from file/string if the new license is valid.

Declaration
Task<ExtendedLicenseInfo> AddLicenseFromFileAsync(string fileContent, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string fileContent

Content of the license file as XML.

CancellationToken cancellationToken
Returns
Type Description
Task<ExtendedLicenseInfo>

Activated license

AssignThirdPartyLicensesAsync(int, string, string[], CancellationToken)

Assign third party licenses

Declaration
Task<ModuleLicenseLink[]> AssignThirdPartyLicensesAsync(int associateId, string moduleOwner, string[] moduleLicenseNames, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId

User to assign third party licenses for

string moduleOwner

Name of the module owner to assign license for

string[] moduleLicenseNames

Name of module licenses to assign

CancellationToken cancellationToken
Returns
Type Description
Task<ModuleLicenseLink[]>

All module license names assigned

ChangeSerialNumberAsync(string, string, CancellationToken)

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

Declaration
Task<LicenseResult> ChangeSerialNumberAsync(string newCompanyName, string newSerialNumber, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string newCompanyName

The new company name

string newSerialNumber

New serial number to change to.

CancellationToken cancellationToken
Returns
Type Description
Task<LicenseResult>

License after serial number/name change

GetCentralLicenseAsync(CancellationToken)

Interface for the License Agent License query, download, activation

Declaration
Task<LicenseOwner[]> GetCentralLicenseAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<LicenseOwner[]>

GetLicenseForAllOwnersFromDBAsync(CancellationToken)

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

Declaration
Task<ExtendedLicenseInfo[]> GetLicenseForAllOwnersFromDBAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<ExtendedLicenseInfo[]>

GetLicenseFromDBAsync(string, CancellationToken)

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

Declaration
Task<ExtendedLicenseInfo> GetLicenseFromDBAsync(string ownerName, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string ownerName

Name of the module owner.

CancellationToken cancellationToken
Returns
Type Description
Task<ExtendedLicenseInfo>

License, with usage, as it is stored in the database.

GetLicenseFromFileAsync(string, CancellationToken)

Load a new license from file

Declaration
Task<ExtendedLicenseInfo> GetLicenseFromFileAsync(string fileContent, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string fileContent

Content of the license file as read.

CancellationToken cancellationToken
Returns
Type Description
Task<ExtendedLicenseInfo>

GetLicenseFromLicenseServerAsync(string, CancellationToken)

Interface for the License Agent License query, download, activation

Declaration
Task<ExtendedLicenseInfo> GetLicenseFromLicenseServerAsync(string ownerName, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string ownerName
CancellationToken cancellationToken
Returns
Type Description
Task<ExtendedLicenseInfo>

GetLicenseStatusFromLicenseServerAsync(string, CancellationToken)

Get License from the license server for a particular module owner.

Declaration
Task<CheckLicenseStatusResult> GetLicenseStatusFromLicenseServerAsync(string ownerName, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string ownerName

Name of the module owner to get license from.

CancellationToken cancellationToken
Returns
Type Description
Task<CheckLicenseStatusResult>

License from the database, from the license server and with usage.

GetModuleLicenseFromDBAsync(string, string, CancellationToken)

Get license information for one particular license module.

Declaration
Task<ModuleLicense> GetModuleLicenseFromDBAsync(string ownerName, string moduleName, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string ownerName

Name of the module owner.

string moduleName

Name of the license module.

CancellationToken cancellationToken
Returns
Type Description
Task<ModuleLicense>

Module License details, as it is stored in the database. NULL if not found.

GetModuleLicenseHistoryFromLicenseServerAsync(ExtendedLicenseInfo, ExtendedModuleLicense, CancellationToken)

Get details about a license from the license server.

Declaration
Task<string> GetModuleLicenseHistoryFromLicenseServerAsync(ExtendedLicenseInfo licenseInfo, ExtendedModuleLicense moduleLicense, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ExtendedLicenseInfo licenseInfo

Description of the license

ExtendedModuleLicense moduleLicense

Information about a particular module to get information for.

CancellationToken cancellationToken
Returns
Type Description
Task<string>

Information about a particular license module.

GetSatelliteLicensesAsync(int, CancellationToken)

Obtain information about satellite module licenses

Declaration
Task<LicenseOwner[]> GetSatelliteLicensesAsync(int satelliteId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int satelliteId

Satellite id to check for satellite module licenses

CancellationToken cancellationToken
Returns
Type Description
Task<LicenseOwner[]>

Satellite module licenses grouped by owners.

GetShopUrlAsync(string, CancellationToken)

Get the shop URL for the specified module owner. This can be used to redirect user to the web shop.

Declaration
Task<string> GetShopUrlAsync(string ownerName, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string ownerName

Name of the module owner.

CancellationToken cancellationToken
Returns
Type Description
Task<string>

The URL which contains the shop for the specified module owner.

GetThirdPartyLicenseAssignmentsAsync(int, string, CancellationToken)

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

Declaration
Task<ModuleLicenseLink[]> GetThirdPartyLicenseAssignmentsAsync(int associateId, string moduleOwner, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId

User to get third party license assignments for

string moduleOwner

Name of the module owner to get license assignments for

CancellationToken cancellationToken
Returns
Type Description
Task<ModuleLicenseLink[]>

Module license names

GetUserAndInstallationLicenceStatusAsync(int, CancellationToken)

Get status values for user licenses and installation license that can be used for feedback to the user.

Declaration
Task<UserAndInstallationLicenceStatus> GetUserAndInstallationLicenceStatusAsync(int associateId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId

Associate id to use when loading information about user licenses and installation license status.

CancellationToken cancellationToken
Returns
Type Description
Task<UserAndInstallationLicenceStatus>

An object that holds information for producing license status feedback to the user.

GetUserLicensesAsync(int, CancellationToken)

Obtain information about associate module licenses

Declaration
Task<LicenseOwner[]> GetUserLicensesAsync(int associateId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId

Associate id to check for associate module licenses

CancellationToken cancellationToken
Returns
Type Description
Task<LicenseOwner[]>

Associate module licenses grouped by owners.

GetUserLicensesMDOListAsync(CancellationToken)

Get all licenses in a MDOListItem structure.

Declaration
Task<SelectableMDOListItem[]> GetUserLicensesMDOListAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<SelectableMDOListItem[]>

Hierarchical structure of user licenses.

RemoveLicenseFromDBAsync(string, CancellationToken)

Remove the license from a particular module owner from the database. It is not permitted to remove licenses from SuperOffice

Declaration
Task<LicenseResult> RemoveLicenseFromDBAsync(string moduleOwner, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string moduleOwner

Name of the module owner to remove license from.

CancellationToken cancellationToken
Returns
Type Description
Task<LicenseResult>

SaveCentralLicenseAsync(LicenseOwner[], CancellationToken)

Interface for the License Agent License query, download, activation

Declaration
Task<LicenseOwner[]> SaveCentralLicenseAsync(LicenseOwner[] license, CancellationToken cancellationToken = default)
Parameters
Type Name Description
LicenseOwner[] license
CancellationToken cancellationToken
Returns
Type Description
Task<LicenseOwner[]>

UnassignThirdPartyLicensesAsync(int, string, string[], CancellationToken)

Unassign (remove) third party licenses

Declaration
Task<ModuleLicenseLink[]> UnassignThirdPartyLicensesAsync(int associateId, string moduleOwner, string[] moduleLicenseNames, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int associateId

User to unassign third party licenses for

string moduleOwner

Name of the module owner to unassign license for

string[] moduleLicenseNames

Name of module licenses to unassign (remove)

CancellationToken cancellationToken
Returns
Type Description
Task<ModuleLicenseLink[]>

All module license names assigned

ValidateLicenseInfoAsync(ExtendedLicenseInfo, CancellationToken)

Validate that a license is consistant.

Declaration
Task<LicenseResult> ValidateLicenseInfoAsync(ExtendedLicenseInfo licenseInfo, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ExtendedLicenseInfo licenseInfo

License to validate consistancy for

CancellationToken cancellationToken
Returns
Type Description
Task<LicenseResult>
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top