Package org.alfresco.repo.audit
Class AuditRecordUtils
java.lang.Object
org.alfresco.repo.audit.AuditRecordUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic AuditRecord.BuildergenerateAuditRecordBuilder(Map<String, Serializable> data, int keyRootLength) Generates anAuditRecord.Builderfrom flat audit data.
-
Method Details
-
generateAuditRecordBuilder
public static AuditRecord.Builder generateAuditRecordBuilder(Map<String, Serializable> data, int keyRootLength) Generates anAuditRecord.Builderfrom flat audit data.This method:
- Translates flat
key-valuepairs into a nested JSON structure. - Preloads the builder with the provided arguments.
- Splits keys by
/to build the nested structure. - Uses the root key as the application ID.
- Assumes each key starts with the same root, constructed as
'/' + auditedApplicationName + '/', which is removed before splitting.
- Parameters:
data- a map containing flat audit data as `key-value` pairskeyRootLength- is a length of key root.- Returns:
- a preloaded
AuditRecord.Builder
- Translates flat
-