Skip to main content

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent”></a> Interface ILicenseAgent

Namespace: SuperOffice.WebApi.Agents
Assembly: SuperOffice.WebApi.dll
License query, download, activation

Implements

IAgentBase, IDisposable

Methods

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_ActivateLicenseInfoAsync_SuperOffice_WebApi_Data_ExtendedLicenseInfo_SuperOffice_WebApi_RequestOptions_”></a> ActivateLicenseInfoAsync(ExtendedLicenseInfo, RequestOptions)

Save a new license to the database.

Parameters

newLicense ExtendedLicenseInfo New license to save to the database. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<LicenseResult&gt;

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_AddLicenseFromFileAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> AddLicenseFromFileAsync(string, RequestOptions)

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

Parameters

fileContent string Content of the license file as XML. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<ExtendedLicenseInfo&gt; Activated license

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_AssignThirdPartyLicensesAsync_System_Int32_System_String_System_String___SuperOffice_WebApi_RequestOptions_”></a> AssignThirdPartyLicensesAsync(int, string, string[], RequestOptions)

Assign third party licenses

Parameters

associateId int User to assign third party licenses for moduleOwner string Name of the module owner to assign license for moduleLicenseNames string[] Name of module licenses to assign requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<ModuleLicenseLink[]&gt; All module license names assigned

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_ChangeSerialNumberAsync_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> ChangeSerialNumberAsync(string, string, RequestOptions)

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

Parameters

newCompanyName string The new company name newSerialNumber string New serial number to change to. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<LicenseResult&gt; License after serial number/name change

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_GetCentralLicenseAsync_SuperOffice_WebApi_RequestOptions_”></a> GetCentralLicenseAsync(RequestOptions)

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<LicenseOwner[]&gt;

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_GetFencingInfoAsync_SuperOffice_WebApi_RequestOptions_”></a> GetFencingInfoAsync(RequestOptions)

Returns fencinginfo if license fence is near or reached

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<FencingInfo&gt; The info of which license fence that is reached or near

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_GetLicenseForAllOwnersFromDBAsync_SuperOffice_WebApi_RequestOptions_”></a> GetLicenseForAllOwnersFromDBAsync(RequestOptions)

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

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<ExtendedLicenseInfo[]&gt;

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_GetLicenseFromDBAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetLicenseFromDBAsync(string, RequestOptions)

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

Parameters

ownerName string Name of the module owner. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<ExtendedLicenseInfo&gt; License, with usage, as it is stored in the database.

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_GetLicenseFromFileAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetLicenseFromFileAsync(string, RequestOptions)

Load a new license from file

Parameters

fileContent string Content of the license file as read. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<ExtendedLicenseInfo&gt;

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_GetLicenseFromLicenseServerAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetLicenseFromLicenseServerAsync(string, RequestOptions)

Parameters

ownerName string requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<ExtendedLicenseInfo&gt;

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_GetLicenseStatusFromLicenseServerAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetLicenseStatusFromLicenseServerAsync(string, RequestOptions)

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

Parameters

ownerName string Name of the module owner to get license from. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<CheckLicenseStatusResult&gt; License from the database, from the license server and with usage.

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_GetModuleLicenseFromDBAsync_System_String_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetModuleLicenseFromDBAsync(string, string, RequestOptions)

Get license information for one particular license module.

Parameters

ownerName string Name of the module owner. moduleName string Name of the license module. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<ModuleLicense&gt; Module License details, as it is stored in the database. NULL if not found.

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_GetModuleLicenseHistoryFromLicenseServerAsync_SuperOffice_WebApi_Data_ExtendedLicenseInfo_SuperOffice_WebApi_Data_ExtendedModuleLicense_SuperOffice_WebApi_RequestOptions_”></a> GetModuleLicenseHistoryFromLicenseServerAsync(ExtendedLicenseInfo, ExtendedModuleLicense, RequestOptions)

Get details about a license from the license server.

Parameters

licenseInfo ExtendedLicenseInfo Description of the license moduleLicense ExtendedModuleLicense Information about a particular module to get information for. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string&gt; Information about a particular license module.

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_GetSatelliteLicensesAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetSatelliteLicensesAsync(int, RequestOptions)

Obtain information about satellite module licenses

Parameters

satelliteId int Satellite id to check for satellite module licenses requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<LicenseOwner[]&gt; Satellite module licenses grouped by owners.

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_GetShopUrlAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetShopUrlAsync(string, RequestOptions)

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

Parameters

ownerName string Name of the module owner. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<string&gt; The URL which contains the shop for the specified module owner.

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_GetThirdPartyLicenseAssignmentsAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetThirdPartyLicenseAssignmentsAsync(int, string, RequestOptions)

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

Parameters

associateId int User to get third party license assignments for moduleOwner string Name of the module owner to get license assignments for requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<ModuleLicenseLink[]&gt; Module license names

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_GetUserAndInstallationLicenceStatusAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetUserAndInstallationLicenceStatusAsync(int, RequestOptions)

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

Parameters

associateId int Associate id to use when loading information about user licenses and installation license status. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<UserAndInstallationLicenceStatus&gt; An object that holds information for producing license status feedback to the user.

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_GetUserLicensesAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetUserLicensesAsync(int, RequestOptions)

Obtain information about associate module licenses

Parameters

associateId int Associate id to check for associate module licenses requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<LicenseOwner[]&gt; Associate module licenses grouped by owners.

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_GetUserLicensesMDOListAsync_SuperOffice_WebApi_RequestOptions_”></a> GetUserLicensesMDOListAsync(RequestOptions)

Get all licenses in a MDOListItem structure.

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<SelectableMDOListItem[]&gt; Hierarchical structure of user licenses.

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_RemoveLicenseFromDBAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> RemoveLicenseFromDBAsync(string, RequestOptions)

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

Parameters

moduleOwner string Name of the module owner to remove license from. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<LicenseResult&gt;

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_SaveCentralLicenseAsync_SuperOffice_WebApi_Data_LicenseOwner___SuperOffice_WebApi_RequestOptions_”></a> SaveCentralLicenseAsync(LicenseOwner[], RequestOptions)

Parameters

license LicenseOwner[] requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<LicenseOwner[]&gt;

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_UnassignThirdPartyLicensesAsync_System_Int32_System_String_System_String___SuperOffice_WebApi_RequestOptions_”></a> UnassignThirdPartyLicensesAsync(int, string, string[], RequestOptions)

Unassign (remove) third party licenses

Parameters

associateId int User to unassign third party licenses for moduleOwner string Name of the module owner to unassign license for moduleLicenseNames string[] Name of module licenses to unassign (remove) requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<ModuleLicenseLink[]&gt; All module license names assigned

<a id=“SuperOffice_WebApi_Agents_ILicenseAgent_ValidateLicenseInfoAsync_SuperOffice_WebApi_Data_ExtendedLicenseInfo_SuperOffice_WebApi_RequestOptions_”></a> ValidateLicenseInfoAsync(ExtendedLicenseInfo, RequestOptions)

Validate that a license is consistant.

Parameters

licenseInfo ExtendedLicenseInfo License to validate consistancy for requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<LicenseResult&gt;