FileEngine 类

此类为所有引擎函数提供接口。

总结

成员 说明
public const 设置& Get设置() const 返回引擎设置。
public const std::vector<std::shared_ptr<SensitivityTypesRulePackage>>& ListSensitivityTypes() const 列出与策略引擎关联的敏感度类型。
public const std::shared_ptr<Label> GetDefaultSensitivityLabel() const 获取默认敏感度标签。
public std::shared_ptr<Label> GetLabelById(const std::string& id) const 根据提供的 ID 获取标签。
public const std::vector<std::shared_ptr<Label>> ListSensitivityLabels() 返回敏感度标签的列表。
public const std::string& GetMoreInfoUrl() const 提供一个 URL,用于查找有关策略/标签的详细信息。
public const std::string& GetPolicyFileId() const 获取策略文件 ID。
public const std::string& GetSensitivityFileId() const 获取敏感度文件 ID。
public bool IsLabelingRequired() const 检查策略是否指示必须标记文档。
public std::chrono::time_point<std::chrono::system_clock> GetLastPolicyFetchTime() const 获取上次获取策略的时间。
public const std::string& GetPolicyDataXml() const 获取策略数据 XML,它描述了与此策略关联的设置、标签和规则。
public std::shared_ptr<AsyncControl> CreateFileHandlerAsync(const std::string& inputFilePath, const std::string& actualFilePath, bool isAuditDiscoveryEnabled, const std::shared_ptr<FileHandler::Observer>& fileHandlerObserver, const std::shared_ptr<void>& context, const std::shared_ptr<FileExecutionState& fileExecutionState>, bool isGetSensitivityLabelAuditDiscoveryEnabled) 开始为给定的文件路径创建文件处理程序。
public std::shared_ptr<AsyncControl> CreateFileHandlerAsync(const std::shared_ptr<Stream>& inputStream, const std::string& actualFilePath, bool isAuditDiscoveryEnabled, const std::shared_ptr<FileHandler::Observer>& fileHandlerObserver, const std::shared_ptr<void>& context, const std::shared_ptr<FileExecutionState& fileExecutionState>, bool isGetSensitivityLabelAuditDiscoveryEnabled) 开始为给定的文件流创建文件处理程序。
public void SendApplicationAuditEvent(const std::string& level, const std::string& eventType, const std::string& eventData) 将应用程序特定事件记录到审核管道。
public const std::vector<std::p air<std::string, std::string>>& GetCustom设置() const 获取自定义设置列表。
public bool HasClassificationRules() const 获取策略是否具有自动规则或建议规则。
public bool HasWorkloadConsent(Workload workload) const 检查用户是否已同意特定工作负载。

成员

GetSettings 函数

返回引擎设置。

ListSensitivityTypes 函数

列出与策略引擎关联的敏感度类型。

返回:敏感度标签的列表。 如果 LoadSensitivityTypesEnabled 为 false,则为空(

另请参阅:FileEngine::Settings)。

GetDefaultSensitivityLabel 函数

获取默认敏感度标签。

返回:如果存在,则返回默认敏感度标签;如果没有设置默认标签,则为 nullptr。

GetLabelById 函数

根据提供的 ID 获取标签。

ListSensitivityLabels 函数

返回敏感度标签的列表。

GetMoreInfoUrl 函数

提供一个 URL,用于查找有关策略/标签的详细信息。

返回:字符串格式的 URL。

GetPolicyFileId 函数

获取策略文件 ID。

返回结果:一个表示策略文件 ID 的字符串

GetSensitivityFileId 函数

获取敏感度文件 ID。

返回结果:一个表示策略文件 ID 的字符串

IsLabelingRequired 函数

检查策略是否指示必须标记文档。

返回:如果标签是必需的,则返回 True,否则返回 false。

GetLastPolicyFetchTime 函数

获取上次获取策略的时间。

返回结果:上次获取策略的时间

GetPolicyDataXml 函数

获取策略数据 XML,它描述了与此策略关联的设置、标签和规则。

返回结果:策略数据 XML。

CreateFileHandlerAsync 函数

开始为给定的文件路径创建文件处理程序。

参数:

  • inputFilePath:要打开的文件。 路径必须包含文件名,如果存在,则文件扩展名为文件扩展名。

  • actualFilePath:实际(非临时)文件路径,将用于审核。

  • isAuditDiscoveryEnabled:表示是否启用审核发现。

  • fileHandlerObserver:实现 FileHandler::Observer 接口的类。

  • context:将不透明地传回观察者的客户端上下文。

  • isGetSensitivityLabelAuditDiscoveryEnabled:表示是否为 getSensitivityLabel 触发审核发现。

返回结果:异步控制对象。

CreateFileHandlerAsync 函数

开始为给定的文件流创建文件处理程序。

参数:

  • inputStream:包含文件数据的流。

  • actualFilePath:文件的路径。 路径必须包含文件名,如果存在,则文件扩展名为文件扩展名。 还将用于标识审核中的文件。

  • isAuditDiscoveryEnabled:表示是否启用审核发现。

  • fileHandlerObserver:实现 FileHandler::Observer 接口的类。

  • context:将不透明地传回观察者的客户端上下文。

  • isGetSensitivityLabelAuditDiscoveryEnabled:表示是否为 getSensitivityLabel 触发审核发现。

返回结果:异步控制对象。

SendApplicationAuditEvent 函数

将应用程序特定事件记录到审核管道。

参数:

  • 级别:日志级别的说明:信息/错误/警告

  • eventType:事件类型的说明

  • eventData:与事件关联的数据

GetCustomSettings 函数

获取自定义设置列表。

返回结果:自定义设置的向量

HasClassificationRules 函数

获取策略是否具有自动规则或建议规则。

返回结果:一个将告知策略中是否存在任何自动规则或建议规则的布尔值

HasWorkloadConsent 函数

检查用户是否已同意特定工作负载。

返回:指示同意的布尔值。