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

ActivateLicenseInfo(ExtendedLicenseInfo)

Save a new license to the database.

Declaration
LicenseResult ActivateLicenseInfo(ExtendedLicenseInfo newLicense)
Parameters
Type Name Description
ExtendedLicenseInfo newLicense

New license to save to the database.

Returns
Type Description
LicenseResult
Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

AddLicenseFromFile(String)

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

Declaration
ExtendedLicenseInfo AddLicenseFromFile(string fileContent)
Parameters
Type Name Description
String fileContent

Content of the license file as XML.

Returns
Type Description
ExtendedLicenseInfo

Activated license

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

AssignThirdPartyLicenses(Int32, String, String[])

Assign third party licenses

Declaration
ModuleLicenseLink[] AssignThirdPartyLicenses(int associateId, string moduleOwner, string[] moduleLicenseNames)
Parameters
Type Name Description
Int32 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

Returns
Type Description
ModuleLicenseLink[]

All module license names assigned

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

ChangeSerialNumber(String, String)

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

Declaration
LicenseResult ChangeSerialNumber(string newCompanyName, string newSerialNumber)
Parameters
Type Name Description
String newCompanyName

The new company name

String newSerialNumber

New serial number to change to.

Returns
Type Description
LicenseResult

License after serial number/name change

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

GetLicenseForAllOwnersFromDB()

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

Declaration
ExtendedLicenseInfo[] GetLicenseForAllOwnersFromDB()
Returns
Type Description
ExtendedLicenseInfo[]
Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

GetLicenseFromDB(String)

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

Declaration
ExtendedLicenseInfo GetLicenseFromDB(string ownerName)
Parameters
Type Name Description
String ownerName

Name of the module owner.

Returns
Type Description
ExtendedLicenseInfo

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

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

GetLicenseFromFile(String)

Load a new license from file

Declaration
ExtendedLicenseInfo GetLicenseFromFile(string fileContent)
Parameters
Type Name Description
String fileContent

Content of the license file as read.

Returns
Type Description
ExtendedLicenseInfo
Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

GetLicenseFromLicenseServer(String)

Interface for the License Agent License query, download, activation

Declaration
ExtendedLicenseInfo GetLicenseFromLicenseServer(string ownerName)
Parameters
Type Name Description
String ownerName
Returns
Type Description
ExtendedLicenseInfo
Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

GetLicenseStatusFromLicenseServer(String)

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

Declaration
CheckLicenseStatusResult GetLicenseStatusFromLicenseServer(string ownerName)
Parameters
Type Name Description
String ownerName

Name of the module owner to get license from.

Returns
Type Description
CheckLicenseStatusResult

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

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

GetModuleLicenseFromDB(String, String)

Get license information for one particular license module.

Declaration
ModuleLicense GetModuleLicenseFromDB(string ownerName, string moduleName)
Parameters
Type Name Description
String ownerName

Name of the module owner.

String moduleName

Name of the license module.

Returns
Type Description
ModuleLicense

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

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

GetModuleLicenseHistoryFromLicenseServer(ExtendedLicenseInfo, ExtendedModuleLicense)

Get details about a license from the license server.

Declaration
string GetModuleLicenseHistoryFromLicenseServer(ExtendedLicenseInfo licenseInfo, ExtendedModuleLicense moduleLicense)
Parameters
Type Name Description
ExtendedLicenseInfo licenseInfo

Description of the license

ExtendedModuleLicense moduleLicense

Information about a particular module to get information for.

Returns
Type Description
String

Information about a particular license module.

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

GetSatelliteLicenses(Int32)

Obtain information about satellite module licenses

Declaration
LicenseOwner[] GetSatelliteLicenses(int satelliteId)
Parameters
Type Name Description
Int32 satelliteId

Satellite id to check for satellite module licenses

Returns
Type Description
LicenseOwner[]

Satellite module licenses grouped by owners.

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

GetShopUrl(String)

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

Declaration
string GetShopUrl(string ownerName)
Parameters
Type Name Description
String ownerName

Name of the module owner.

Returns
Type Description
String

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

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

GetThirdPartyLicenseAssignments(Int32, String)

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

Declaration
ModuleLicenseLink[] GetThirdPartyLicenseAssignments(int associateId, string moduleOwner)
Parameters
Type Name Description
Int32 associateId

User to get third party license assignments for

String moduleOwner

Name of the module owner to get license assignments for

Returns
Type Description
ModuleLicenseLink[]

Module license names

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

GetUserAndInstallationLicenceStatus(Int32)

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

Declaration
UserAndInstallationLicenceStatus GetUserAndInstallationLicenceStatus(int associateId)
Parameters
Type Name Description
Int32 associateId

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

Returns
Type Description
UserAndInstallationLicenceStatus

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

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

GetUserLicenses(Int32)

Obtain information about associate module licenses

Declaration
LicenseOwner[] GetUserLicenses(int associateId)
Parameters
Type Name Description
Int32 associateId

Associate id to check for associate module licenses

Returns
Type Description
LicenseOwner[]

Associate module licenses grouped by owners.

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

GetUserLicensesMDOList()

Get all licenses in a MDOListItem structure.

Declaration
SelectableMDOListItem[] GetUserLicensesMDOList()
Returns
Type Description
SelectableMDOListItem[]

Hierarchical structure of user licenses.

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

RemoveLicenseFromDB(String)

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

Declaration
LicenseResult RemoveLicenseFromDB(string moduleOwner)
Parameters
Type Name Description
String moduleOwner

Name of the module owner to remove license from.

Returns
Type Description
LicenseResult
Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

UnassignThirdPartyLicenses(Int32, String, String[])

Unassign (remove) third party licenses

Declaration
ModuleLicenseLink[] UnassignThirdPartyLicenses(int associateId, string moduleOwner, string[] moduleLicenseNames)
Parameters
Type Name Description
Int32 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)

Returns
Type Description
ModuleLicenseLink[]

All module license names assigned

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

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

ValidateLicenseInfo(ExtendedLicenseInfo)

Validate that a license is consistant.

Declaration
LicenseResult ValidateLicenseInfo(ExtendedLicenseInfo licenseInfo)
Parameters
Type Name Description
ExtendedLicenseInfo licenseInfo

License to validate consistancy for

Returns
Type Description
LicenseResult
Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (LicenseAgent agent = new LicenseAgent())
     {
        // call methods on agent here...
     }
  }
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top