IAuditFilterCondition.ObjectKey

Syntax

ObjectKey(Index: Integer): Integer;

ObjectKey[Index: integer]: integer;

Parameters

Index. Position index. The number of keys is defined by the property. IAuditFilterCondition.ObjectKeyCount.

Description

The ObjectKey property determines a key of an object for that protocol records are displayed.

Example

Executing the example requires that repository contains a report with the Report identifier.

Add links to the Metabase, ForeSystem (for the Fore.NET example) system assemblies.

Sub UserProc;
Var
    Mb: IMetabase;
    Log: IAuditLog;
    Con: IAuditFilterCondition;
    Fil: IAuditFilter;
    objectKey: Integer;
    operations: IAuditOperations;
    Lic: Object;
    d: DateTime;
Begin
    Mb := MetabaseClass.Active;
    Lic := Mb.RequestLicense(UiLicenseFeatureType.Adm);
    Log := Mb.Security.OpenAuditLog;
    Fil := Log.Filter;
    
If Fil.Count <= 0 Then
        Con := Fil.Add;
    
Else
        Con := Fil.Item(
0);
    
End If;
    Con.IncludeFailedLogons := 
False;
    Con.IncludeSucceededLogons := 
False;
    objectKey := MB.ItemById(
"Report").Key;
    Con.ObjectKeyCount := 
1;
    Con.ObjectKey(
0) := objectKey;
    operations := Log.OpenOperationTree(-
1, -1);
    
While Not operations.Eof Do
        Debug.Write(operations.Name + 
"; ");
        d := DateTime.FromDouble(operations.Stamp);
        Debug.WriteLine(d.ToString + 
";");
        operations.Next;
    
End While;
    operations.Eof;
End Sub UserProc;

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

Public
 Shared Sub Main(Params: StartParams);
Var
    Mb: IMetabase;
    Log: IAuditLog;
    Con: IAuditFilterCondition;
    Fil: IAuditFilter;
    objectKey: Integer;
    operations: IAuditOperations;
    Lic: Object;
    d: System.DateTime;
Begin
    Mb := Params.Metabase;
    Lic := Mb.RequestLicense(UiLicenseFeatureType.lftAdm);
    Log := Mb.Security.OpenAuditLog();
    Fil := Log.Filter;
    
If Fil.Count <= 0 Then
        Con := Fil.Add();
    
Else
        Con := Fil.Item[
0];
    
End If;
    Con.IncludeFailedLogons := 
False;
    Con.IncludeSucceededLogons := 
False;
    objectKey := MB.ItemById[
"Report"].Key As integer;
    Con.ObjectKeyCount := 
1;
    Con.ObjectKey[
0] := objectKey;
    operations := Log.OpenOperationTree(-
1, -1);
    
While Not operations.Eof() Do
        System.Diagnostics.Debug.Write(operations.Name + 
"; ");
        d := DateTime.FromOADate(operations.Stamp);
        System.Diagnostics.Debug.WriteLine(d.ToString() + 
";");
        operations.Next();
    
End While;
    operations.Eof();
End Sub;

After executing the example, the console will display a list of operations executed over the object. Name, date and time are displayed for each operation.

See also:

IAuditFilterCondition