Table of Contents

Class ViewAuditLogCommand

Namespace
Core.CliniCore.Commands.Admin
Assembly
Core.CliniCore.dll

Represents a command that retrieves audit log entries based on specified criteria such as date range and user identifier.

public class ViewAuditLogCommand : AbstractCommand, ICommand
Inheritance
ViewAuditLogCommand
Implements
Inherited Members

Remarks

The ViewAuditLogCommand allows querying the system's audit log for activity records. Parameters such as start date, end date, and user ID can be provided to filter the results. This command typically requires appropriate permissions to access audit data.

Fields

Key

Represents the key used to identify the "view audit log" permission in authorization checks.

public const string Key = "viewauditlog"

Field Value

string

Properties

CommandKey

Gets the unique key that identifies the command.

public override string CommandKey { get; }

Property Value

string

Description

Gets a textual description of the current object.

public override string Description { get; }

Property Value

string

Methods

ExecuteCore(CommandParameters, SessionContext?)

Executes the core logic of the command using the specified parameters and session context.

protected override CommandResult ExecuteCore(CommandParameters parameters, SessionContext? session)

Parameters

parameters CommandParameters

The parameters that define the command's behavior and input values. Cannot be null.

session SessionContext

The session context in which the command is executed, or null to execute without a session.

Returns

CommandResult

A CommandResult representing the outcome of the command execution, including any result data or status information.

Remarks

This method is intended to be overridden in derived classes to implement specific command logic. The provided session may be null if session-based execution is not required.

Exceptions

NotImplementedException

GetRequiredPermission()

Returns the Permission required to access the associated resource or perform the operation.

public override Permission? GetRequiredPermission()

Returns

Permission?

The Permission required for access, or null if no specific permission is required.

Remarks

Override this method to specify the permission necessary for the current context. The returned permission determines whether access is granted.

Exceptions

NotImplementedException

ValidateParameters(CommandParameters)

Validates the specified command parameters and returns the result of the validation.

protected override CommandValidationResult ValidateParameters(CommandParameters parameters)

Parameters

parameters CommandParameters

The parameters to validate for the command. Cannot be null.

Returns

CommandValidationResult

A CommandValidationResult indicating whether the parameters are valid and, if not, providing details about validation failures.

Exceptions

NotImplementedException