ILicence¶
- class ILicence¶
Bases:
ImpactCOMWrapperBase- Description:
Represents a licence.
- Remarks:
For an Impact Application this object represents the licence allocated to the workstation, either information about the attached des_key dongle, or Nalpeiron licence, or the allocated Licence Server Impact licence. For an nServer session this object is used to request a particular Licence Server nServer licence for the lifetime the associated IDatabase object is connected.
Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance
- property application_name¶
Gets application_name.
- Description:
Returns the name of the allocated nServer Application Licence.
- Remarks:
This method only applies to IServer and will fail if called from Impact. This method only applies when using an nServer Application Licence and the licence has already been allocated.
- Returns:
The value of application_name.
- Return type:
application_name (str)
- property comments¶
Gets Comments.
- Description:
Gets the comments for the licence.
- Returns:
The value of Comments.
- Return type:
comments (str)
- property customer¶
Gets Customer.
- Description:
Gets the customer for the licence.
- Returns:
The value of Customer.
- Return type:
customer (str)
- property date_created¶
Gets date_created.
- Description:
Gets the date the licence was created.
- Returns:
The value of date_created.
- Return type:
date_created (datetime)
- property id¶
Gets ID.
- Description:
Gets the licence identification number.
- Remarks:
For an Impact Application this is the des_key dongle id or allocated Licence Server Impact Licence id. For nServer this is the combined Licence Server des_key dongle id and unique Licence Number.
- Returns:
The value of ID.
- Return type:
id (int)
- property library_objects¶
Gets library_objects.
- Description:
Gets an ILibraryObjects collection representing all the library objects available for this licence.
- Remarks:
Both Impact and nServer Application licences support library objects. nServer Open licences do not support library objects.
- Returns:
The value of library_objects.
- Return type:
- property licence_file¶
Gets licence_file.
- Description:
Gets the file associated with the licence.
- Returns:
The value of licence_file.
- Return type:
licence_file (str)
- property licence_still_active¶
Gets licence_still_active.
- Description:
Determines if the nServer Licence is still allocated.
- Remarks:
This property can be used to determine if the nServer Licence is still allocated. Accessing this property will also refresh the last access time for the licence and prevent the Licence from being revoked automatically for another Timeout minutes. Most calls to IDatabase methods and properties will automatically refresh the last access time so this call is only required if your application remains in a state of inactivity. In this case periodically calling licence_still_active will ensure your allocated licence is retained. This method only applies to IServer and will fail if called from Impact.
- Returns:
The value of licence_still_active.
- Return type:
licence_still_active (bool)
- property single_licence_per_user¶
Gets single_licence_per_user.
- Description:
Specifies whether a single nServer licence is allocated per user.
- Remarks:
When the IDatabase.single_connection property is false it is possible to connect multiple IDatabase objects to the same database with the same login_id. Normally this would result in an nServer licence being allocated to each IDatabase object. However if you only ever want a single licence allocated to each unique login_id then set this property to true. If a second IDatabase object is connected and allocated a licence then the first licence will be revoked and the first session will timeout. This method only applies to IServer and will fail if called from Impact.
- Returns:
The value of single_licence_per_user.
- Return type:
single_licence_per_user (bool)
- property timeout¶
Gets Timeout.
- Description:
Determines the timeout (in minutes) before the licence is revoked.
- Remarks:
This method only applies to IServer and will fail if called from Impact. When an nServer Licence is allocated it will remain active as long as methods and properties of IDatabase are accessed or licence_still_active is called periodically. If you do not refresh the licence with Timeout minutes then the licence is revoked and returned to the Licence Server for use by another client. The default value is 10 minutes. When overriding this value, you should do it before connecting to the database (IDatabase.connect).
- Returns:
The value of Timeout.
- Return type:
timeout (int)
- property xml¶
Gets Xml.
- Description:
Returns an Xml representation of the Impact licence.
- Remarks:
This function is not supported on nServer. Introduced in Impact 7.0.0.71.
- Returns:
The value of Xml.
- Return type:
xml (str)
- get_features()¶
- Description:
Gets more features of the licence.
- Remarks:
Returns a variant (which is a string list) that represents other features applicable to the licence. This method has not yet been implemented. Remember arrays are zero based and collections are one based.
- licence_already_acquired(login_i_d)¶
- Description:
Determines if an nServer licence has already been allocated to a specific user.
- Remarks:
This method only applies to IServer and will fail if called from Impact.
- Parameters:
login_id (str) – The username to check.
- revoke()¶
- Description:
Revokes the nServer Licence from the Licence Server.
- Remarks:
Revoking an nServer licence will cause the licence to be returned to the pool of available licences. The licence can then be used by another nServer instance as required. Once revoked the IDatabase will never automatically reaquire the same licence. Normally it is not neccessary to call this methoid as licences are automatically revoked when the IDatabase.disconnect method is called. However in web applications that cache IDatabase objects it may be required to explicitly revoke licences when sessions timeout. This method only applies to IServer and will fail if called from Impact. Introduced in Impact 7.0.0.10.
- use_application_licence(vendor_g_u_i_d, application_g_u_i_d)¶
- Description:
Specifies that the nServer should request an Application Licence.
- Remarks:
nServer Application Licences are allocated to specific applications developed by Arden Software and third parties. Each licence is specific to an application. For information about obtaining an nServer Application Licence please contact Arden Software. The gui_ds allocated for an nServer Application Licence should not be distributed and should only be used within your compiled application. This method only applies to IServer and will fail if called from Impact. This method cannot be called after the licence has already been allocated.
- Parameters:
vendor_guid (str) – A GUID that identifies the Vendor of the nServer Application Licence.
application_guid (str) – A GUID that identifies the Application of the nServer Application Licence.
- use_open_licence(licence_g_u_i_d)¶
- Description:
Specifies that the nServer should request an Open Licence.
- Remarks:
nServer Open Licences are designed to allow customers to write their own nServer applications. Each licence is specific to a licence server and customer. For information about obtaining an nServer Open Licence please contact Arden Software. The GUID for an nServer Open Licence can be determined by looking at the properties of the Licence in the Licence Server Administator. This method only applies to IServer and will fail if called from Impact. This method cannot be called after the licence has already been allocated.
- Parameters:
licence_guid (str) – The GUID that identifies the nServer Open Licence