IMetabaseAuditPolicy.LogRecordCountThreshold

Syntax

LogRecordCountThreshold(State: Integer): Integer;

LogRecordCountThreshold[System.Int32]: System.Int32;

Parameters

State. It is a threshold for which the limit of records should be determined. "1" and "2" values are acceptable as a value of this parameter.

Description

The LogRecordCountThreshold property determines the number of records of the access protocol for this threshold. The warning message will be shown, if the user reached this threshold.

Comments

In the security policy settings two threshold values of record number in access protocol can be defined, when the number is exceed, the message indicating that access protocol must be cleared displays.

The second threshold value should be greater than the first one.

When connecting to the security manager, if one of threshold values was reached, the information message that the access protocol should be cleared, is shown to the user.

The "0" value should be assigned in this property to remove the threshold values.

NOTE. The second threshold value should be greater than the first one. This fact is check when the threshold values are assigned. The second threshold value should be assigned earlier than the first one to avoid error during this comparison.

Example

To execute the example, add the Metabase, ForeSystem (for Fore.NET example) system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    AuditPolicy: IMetabaseAuditPolicy;
    Lic: Object;
Begin
    MB := MetabaseClass.Active;
    
// Get license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
    MS := MB.Security;
    
// Install threshold values of access protocol capacity
    AuditPolicy := MS.Policy.AuditPolicy;
    AuditPolicy.LogRecordCountThreshold(
2) := 20000;
    AuditPolicy.LogRecordCountThreshold(
1) := 10000;
    
// Save changes
    MS.Apply;
    
// Check in license
    Lic := Null;
End Sub UserProc;

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.ForeSystem;

Public Shared Sub Main(Params : StartParams);
Var
    MB: IMetabase;
    MS: IMetabaseSecurity;
    AuditPolicy: IMetabaseAuditPolicy;
    Lic: Object;
Begin
    MB := Params.Metabase;
    
// Get license to work with security manager
    Lic := MB.RequestLicense(UiLicenseFeatureType.lftAdm);
    MS := MB.Security;
    
// Install threshold values of access protocol capacity
    AuditPolicy := MS.Policy.AuditPolicy;
    AuditPolicy.LogRecordCountThreshold[
2] := 20000;
    AuditPolicy.LogRecordCountThreshold[
1] := 10000;
    
// Save changes
    MS.Apply();
    
// Check in license
    Lic := Null;
End Sub;

The first and the second threshold values will be assigned for capacity of the access protocol during execution of the example.

See also:

IMetabaseAuditPolicy