Class AuditSerializerHelper
java.lang.Object
com.inductiveautomation.ignition.gateway.storeforward.serialization.util.AuditSerializerHelper
-
Method Summary
Modifier and TypeMethodDescriptionfromAuditRecordToProto
(PersistentAuditRecord auditRecord) Converts aPersistentAuditRecord
object to aAuditRecordProto.AuditRecordPB
protocol buffer representation.fromAuditRecordToProto
(PersistentAuditRecord auditRecord, String sourceSystem) Converts aPersistentAuditRecord
instance into aAuditRecordProto.AuditRecordPB
protocol buffer object.static PersistentAuditRecord
fromProtoToAuditRecord
(AuditRecordProto.AuditRecordPB auditRecordPB) Converts anAuditRecordProto.AuditRecordPB
protocol buffer object into aPersistentAuditRecord
object.
-
Method Details
-
fromAuditRecordToProto
public static AuditRecordProto.AuditRecordPB fromAuditRecordToProto(PersistentAuditRecord auditRecord) Converts aPersistentAuditRecord
object to aAuditRecordProto.AuditRecordPB
protocol buffer representation.- Parameters:
auditRecord
- the persistent audit record object to be converted; must not be null- Returns:
- a protocol buffer representation of the given audit record
-
fromAuditRecordToProto
public static AuditRecordProto.AuditRecordPB fromAuditRecordToProto(PersistentAuditRecord auditRecord, @Nullable String sourceSystem) Converts aPersistentAuditRecord
instance into aAuditRecordProto.AuditRecordPB
protocol buffer object.- Parameters:
auditRecord
- the audit record to be converted; it contains the details of the audit-related event, such as the action performed, actor information, and context.sourceSystem
- an optional string that represents the source system; if provided, it will be prepended to the originating system of the audit record.- Returns:
- the corresponding
AuditRecordProto.AuditRecordPB
protocol buffer object with the converted audit record details.
-
fromProtoToAuditRecord
public static PersistentAuditRecord fromProtoToAuditRecord(AuditRecordProto.AuditRecordPB auditRecordPB) Converts anAuditRecordProto.AuditRecordPB
protocol buffer object into aPersistentAuditRecord
object.- Parameters:
auditRecordPB
- the protocol buffer representation of an audit record to be converted.- Returns:
- a
PersistentAuditRecord
object constructed from the given protocol buffer.
-