Class AuditFactory
- java.lang.Object
-
- com.evolveum.midpoint.init.AuditFactory
-
public class AuditFactory extends Object
Audit factory is a managed component that hides multiple actualAuditServiceFactory
components - andAuditService
s they create - behind a single proxy implementation. This is actually "Audit Service Proxy Factory", the service is returned bycreateAuditService()
. 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. ActualAuditService
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 ofAuditServiceFactory
hierarchy.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONF_AUDIT_SERVICE
static String
CONF_AUDIT_SERVICE_FACTORY
-
Constructor Summary
Constructors Constructor Description AuditFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuditService
createAuditService()
void
init()
-
-
-
Field Detail
-
CONF_AUDIT_SERVICE
public static final String CONF_AUDIT_SERVICE
- See Also:
- Constant Field Values
-
CONF_AUDIT_SERVICE_FACTORY
public static final String CONF_AUDIT_SERVICE_FACTORY
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
@PostConstruct public void init()
-
createAuditService
public AuditService createAuditService()
-
-