EvaluationResult Class

Represents the object that contains the details of the compliance evaluation result. It contains three properties—isCompliant, complianceMessage, and complianceLogMessage.

Namespace 

ComplianceMgmt

Example 

1@VisibleApiVersion(minApiVersion='256')
2global class EvaluationResult {
3   Boolean isCompliant; // Indicates whether the evaluation was compliant (true) or not (false).
4   String complianceMessage; // Message associated to compliance evaluation.
5   String complianceLogMessage; // Message associated to compliance evaluation
6                                // that's logged for compliance audits.
7
8   global EvaluationResult(Boolean isCompliant, String complianceMessage, String complianceLogMessage) {
9       this.isCompliant = isCompliant;
10       this.complianceMessage = complianceMessage;
11       this.complianceLogMessage = complianceLogMessage;
12   }
13
14   global Boolean getIsCompliant() {
15       return this.isCompliant;
16   }
17
18   global String getComplianceMessage() {
19       return this.complianceMessage;
20   }
21
22   global String getComplianceLogMessage() {
23       return this.complianceLogMessage;
24   }
25}

EvaluationResult Constructors 

Learn more about the constructors available with the EvaluationResult class.

The EvaluationResult class includes this constructor.

EvaluationResult(isCompliant, complianceMessage, complianceMessageLog) 

Initializes an EvaluationResult object.

Signature 

public EvaluationResult(Boolean isCompliant, String complianceMessage, String complianceMessageLog)

Parameters 

isCompliant

Type: Boolean

Indicates whether the compliance evaluated to true or false.

complianceMessage

Type: String

Message associated with the completed evaluation. Maximum length supported for compliance message is 1024 characters.

complianceMessageLog

Type: String

Message stored in compliance logs for the evaluation done. Maximum length supported for compliance message log is 1024 characters.

EvaluationResult Methods 

Learn more about the methods available with the EvaluationResult class.

The EvaluationResult class includes these methods.

getComplianceMessage() 

Gets the message associated with the completed compliance.

Signature 

public String getComplianceMessage()

Return Value 

Type: String

getComplianceMessageLog() 

Gets the message stored in the log for the compliance evaluation done.

Signature 

public String getComplianceMessageLog()

Return Value 

Type: String

getIsCompliant() 

Gets the status of compliance for a control input.

Signature 

public Boolean getIsCompliant()

Return Value 

Type: Boolean