Class AuditLogEventRegistry
java.lang.Object
org.jpos.log.AuditLogEventRegistry
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 Summary
Modifier and TypeMethodDescriptionstatic <M extends com.fasterxml.jackson.databind.ObjectMapper>
Mregister(M mapper) Registers every knownAuditLogEventsubtype on the givenObjectMapper.static Collection<AuditLogEventType> types()Returns every registered type mapping.
-
Method Details
-
types
Returns every registered type mapping.- Returns:
- all known type mappings, built-ins first, then ServiceLoader-discovered.
-
register
Registers every knownAuditLogEventsubtype on the givenObjectMapper. Renderers should call this once after constructing their mapper.- Type Parameters:
M- concrete mapper type, allowing fluent chaining on subclasses such asXmlMapper- Parameters:
mapper- the JacksonObjectMapper(or subclass, e.g.XmlMapper)- Returns:
- the same mapper for chaining
-