Class AuditLogEventRegistry

java.lang.Object
org.jpos.log.AuditLogEventRegistry

public final class AuditLogEventRegistry extends Object
Registry of AuditLogEvent type mappings.

Holds the built-in type ids and discovers additional ones contributed by AuditLogEventProvider implementations through ServiceLoader. The result is a single source of truth used by every Jackson-based renderer in jPOS to register subtypes on its ObjectMapper.

The registry is initialized lazily on first use. Built-in entries are always registered first so external providers cannot shadow them: any provider entry that re-uses a built-in id, or that collides with another provider entry, is rejected with IllegalStateException.

Since:
3.0.0
  • Method Details

    • types

      Returns every registered type mapping.
      Returns:
      all known type mappings, built-ins first, then ServiceLoader-discovered.
    • register

      public static <M extends com.fasterxml.jackson.databind.ObjectMapper> M register(M mapper)
      Registers every known AuditLogEvent subtype on the given ObjectMapper. Renderers should call this once after constructing their mapper.
      Type Parameters:
      M - concrete mapper type, allowing fluent chaining on subclasses such as XmlMapper
      Parameters:
      mapper - the Jackson ObjectMapper (or subclass, e.g. XmlMapper)
      Returns:
      the same mapper for chaining