Package org.idempiere.tracking
Class AuditTraceContext
java.lang.Object
org.idempiere.tracking.AuditTraceContext
Thread-local carrier for the ExternalTraceId used in audit changelog entries.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidclear()Removes the ExternalTraceId bound to the current thread.static StringReturns the ExternalTraceId bound to the current thread, ornullif none has been set.static voidsetExternalTraceId(String externalTraceId) Binds an ExternalTraceId to the current thread.
-
Method Details
-
getExternalTraceId
Returns the ExternalTraceId bound to the current thread, ornullif none has been set. A null return is normal for non-REST code paths. -
setExternalTraceId
Binds an ExternalTraceId to the current thread.- Parameters:
externalTraceId-
-
clear
public static void clear()Removes the ExternalTraceId bound to the current thread. Must be called in afinallyblock at every entry point that callssetExternalTraceId(String).
-