Class AuditUtil
java.lang.Object
com.ssgllc.fish.service.util.published.AuditUtil
Publishes application-defined audit events from a script.
-
Field Summary
FieldsModifier and TypeFieldDescriptioncom.ssgllc.fish.security.jwt.ApplicationEventPublisherService -
Constructor Summary
ConstructorsConstructorDescriptionAuditUtil(com.ssgllc.fish.security.jwt.ApplicationEventPublisherService applicationEventPublisherService) -
Method Summary
Modifier and TypeMethodDescriptionvoidpublishCustomEvent(String eventType, Map<String, Object> data) Publishes a custom audit event, recording it alongside the platform's own audit entries.
-
Field Details
-
applicationEventPublisherService
public com.ssgllc.fish.security.jwt.ApplicationEventPublisherService applicationEventPublisherService
-
-
Constructor Details
-
AuditUtil
public AuditUtil(com.ssgllc.fish.security.jwt.ApplicationEventPublisherService applicationEventPublisherService)
-
-
Method Details
-
publishCustomEvent
Publishes a custom audit event, recording it alongside the platform's own audit entries. Use it to leave a durable trace of something the platform does not audit by itself - an external call, a business decision taken in a script, a manual override.- Parameters:
eventType- the event type to record; pick a stable name, since reports and audit queries filter on itdata- values to record with the event
Groovy example:
auditUtil.publishCustomEvent("ORDER_OVERRIDE", ['orderId': entity.id, 'reason': 'manual approval'])
Returns:
nothing; the event is written to the audit log
-