Class AuditFactory


  • public class AuditFactory
    extends Object
    Audit factory is a managed component that hides multiple actual AuditServiceFactory components - and AuditServices they create - behind a single proxy implementation. This is actually "Audit Service Proxy Factory", the service is returned by createAuditService(). This component takes care of "midpoint/audit" part of the config XML and "auditService" elements there.

    Initialization process uses configured managed components (Spring beans) of type AuditServiceFactory. Audit service factory declared in the config is used, the rest is not. This means the factory class can't do anything disruptive as part of its bean initialization. Actual AuditService is created as non-managed component but Spring is asked to autowire its dependencies, this means that there is no Spring way how to say the dependencies in advance. This means that at this time all the used dependencies must be initialized already, which can be taken care of by the service's factory, e.g. factory autowiring the field needed by the service, even if the factory itself doesn't need it.

    While technically this creates AuditService, hence it is a factory (see its Spring configuration), it is NOT part of AuditServiceFactory hierarchy.

    • Constructor Detail

      • AuditFactory

        public AuditFactory()
    • Method Detail

      • init

        @PostConstruct
        public void init()
      • createAuditService

        public AuditService createAuditService()