Class AbstractAuditLoggerConfiguration
java.lang.Object
se.swedenconnect.signservice.core.config.AbstractHandlerConfiguration<AuditLogger>
se.swedenconnect.signservice.audit.base.AbstractAuditLoggerConfiguration
- All Implemented Interfaces:
HandlerConfiguration<AuditLogger>
- Direct Known Subclasses:
ActuatorAuditLoggerConfiguration
,CallbackAuditLoggerConfiguration
,FileAuditLoggerConfiguration
,LogSystemAuditLoggerConfiguration
public abstract class AbstractAuditLoggerConfiguration
extends AbstractHandlerConfiguration<AuditLogger>
Abstract handler configuration for creating
AuditLogger
instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass
<? extends AuditEventFactory> If the default (DefaultAuditEventFactory
) has been overridden (seesetEventFactory(Class)
), this method returns this class, otherwise it returnsnull
.Gets the default principal to assign to audit events.void
setEventFactory
(Class<? extends AuditEventFactory> eventFactory) By default theDefaultAuditEventFactory
is used to create audit events.void
setPrincipal
(String principal) Assigns the default principal to assign to audit events.Methods inherited from class se.swedenconnect.signservice.core.config.AbstractHandlerConfiguration
assignValue, excludeFromRecursiveMerge, getBeanName, getDefaultConfig, getDefaultConfigRef, getDefaultFactoryClass, getFactoryClass, getName, getterNameToSetter, init, isMergeCandidate, mergeArrays, mergeConfigObject, mergeDefaultConfiguration, mergeLists, mergeMaps, needsDefaultConfigResolving, resolveDefaultConfigRef, setBeanName, setDefaultConfig, setDefaultConfigRef, setFactoryClass, setName, setterNameToField
-
Constructor Details
-
AbstractAuditLoggerConfiguration
public AbstractAuditLoggerConfiguration()
-
-
Method Details
-
getEventFactory
If the default (DefaultAuditEventFactory
) has been overridden (seesetEventFactory(Class)
), this method returns this class, otherwise it returnsnull
.- Returns:
- the event factory, or null if the default should be used
-
setEventFactory
By default theDefaultAuditEventFactory
is used to create audit events. By assigning another class that may be overridden.Note that the class given must have a default constructor (i.e., a no-arg constructor).
- Parameters:
eventFactory
- the event factory to use (null to use default)
-
getPrincipal
Gets the default principal to assign to audit events. It should be equal to the clientID that the audit logger is servicing. If the audit logger is a system logger, theAuditEvent.DEFAULT_PRINCIPAL
should be used.- Returns:
- the principal name or null
-
setPrincipal
Assigns the default principal to assign to audit events. It should be equal to the clientID that the audit logger is servicing. If the audit logger is a system logger, theAuditEvent.DEFAULT_PRINCIPAL
should be used.- Parameters:
principal
- the principal name
-