Class AuditSerializerHelper
java.lang.Object
com.inductiveautomation.ignition.gateway.storeforward.serialization.util.AuditSerializerHelper
-
Method Summary
Modifier and TypeMethodDescriptionfromAuditRecordToProto(PersistentAuditRecord auditRecord) Converts aPersistentAuditRecordobject to aAuditRecordProto.AuditRecordPBprotocol buffer representation.fromAuditRecordToProto(PersistentAuditRecord auditRecord, String sourceSystem) Converts aPersistentAuditRecordinstance into aAuditRecordProto.AuditRecordPBprotocol buffer object.static PersistentAuditRecordfromProtoToAuditRecord(AuditRecordProto.AuditRecordPB auditRecordPB) Converts anAuditRecordProto.AuditRecordPBprotocol buffer object into aPersistentAuditRecordobject.
-
Method Details
-
fromAuditRecordToProto
public static AuditRecordProto.AuditRecordPB fromAuditRecordToProto(PersistentAuditRecord auditRecord) Converts aPersistentAuditRecordobject to aAuditRecordProto.AuditRecordPBprotocol 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 aPersistentAuditRecordinstance into aAuditRecordProto.AuditRecordPBprotocol 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.AuditRecordPBprotocol buffer object with the converted audit record details.
-
fromProtoToAuditRecord
public static PersistentAuditRecord fromProtoToAuditRecord(AuditRecordProto.AuditRecordPB auditRecordPB) Converts anAuditRecordProto.AuditRecordPBprotocol buffer object into aPersistentAuditRecordobject.- Parameters:
auditRecordPB- the protocol buffer representation of an audit record to be converted.- Returns:
- a
PersistentAuditRecordobject constructed from the given protocol buffer.
-