Package stroom.query.audit
Class AuditedQueryBundle<CONFIG extends io.dropwizard.Configuration & HasTokenConfig & HasAuthorisationConfig,DOC_REF_SERVICE extends DocRefService<DOC_REF_POJO>,DOC_REF_POJO extends DocRefEntity,QUERY_SERVICE extends QueryService>
- java.lang.Object
-
- stroom.query.audit.AuditedQueryBundle<CONFIG,DOC_REF_SERVICE,DOC_REF_POJO,QUERY_SERVICE>
-
- Type Parameters:
CONFIG
- The configuration classDOC_REF_POJO
- POJO class for the DocumentQUERY_SERVICE
- Implementation class for the Query ServiceDOC_REF_SERVICE
- Implementation class for the DocRef Service
- All Implemented Interfaces:
io.dropwizard.ConfiguredBundle<CONFIG>
public class AuditedQueryBundle<CONFIG extends io.dropwizard.Configuration & HasTokenConfig & HasAuthorisationConfig,DOC_REF_SERVICE extends DocRefService<DOC_REF_POJO>,DOC_REF_POJO extends DocRefEntity,QUERY_SERVICE extends QueryService> extends java.lang.Object implements io.dropwizard.ConfiguredBundle<CONFIG>
This Dropwizard bundle can be used to register an implementation of Query Resource implementation This bundle will wrap that implementation in an audited layer, any requests made to your Query Resource will be passed to theQueryEventLoggingService
It will also register an audited version of the external DocRef resource. External DataSources will need to provide implementations of DocRef resource to allow stroom to manage the documents that live outside of it.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<DOC_REF_POJO>
docRefEntityClass
protected java.lang.Class<DOC_REF_SERVICE>
docRefServiceClass
-
Constructor Summary
Constructors Constructor Description AuditedQueryBundle(java.util.function.Function<CONFIG,com.google.inject.Injector> injectorSupplier, java.lang.Class<DOC_REF_SERVICE> docRefServiceClass, java.lang.Class<DOC_REF_POJO> docRefEntityClass, java.lang.Class<QUERY_SERVICE> queryServiceClass)
-
Method Summary
Modifier and Type Method Description com.google.inject.Module
getGuiceModule(CONFIG configuration)
This function will be overridden by child classes that have further specific modules to register.void
initialize(io.dropwizard.setup.Bootstrap<?> bootstrap)
void
run(CONFIG configuration, io.dropwizard.setup.Environment environment)
-
-
-
Field Detail
-
docRefServiceClass
protected final java.lang.Class<DOC_REF_SERVICE extends DocRefService<DOC_REF_POJO>> docRefServiceClass
-
docRefEntityClass
protected final java.lang.Class<DOC_REF_POJO extends DocRefEntity> docRefEntityClass
-
-
Constructor Detail
-
AuditedQueryBundle
public AuditedQueryBundle(java.util.function.Function<CONFIG,com.google.inject.Injector> injectorSupplier, java.lang.Class<DOC_REF_SERVICE> docRefServiceClass, java.lang.Class<DOC_REF_POJO> docRefEntityClass, java.lang.Class<QUERY_SERVICE> queryServiceClass)
-
-
Method Detail
-
getGuiceModule
public com.google.inject.Module getGuiceModule(CONFIG configuration)
This function will be overridden by child classes that have further specific modules to register.- Parameters:
configuration
- The dropwizard application configuration- Returns:
- A guice module which combines the immediate dependencies and any from underlying bundles
-
initialize
public void initialize(io.dropwizard.setup.Bootstrap<?> bootstrap)
- Specified by:
initialize
in interfaceio.dropwizard.ConfiguredBundle<CONFIG extends io.dropwizard.Configuration & HasTokenConfig & HasAuthorisationConfig>
-
run
public void run(CONFIG configuration, io.dropwizard.setup.Environment environment)
- Specified by:
run
in interfaceio.dropwizard.ConfiguredBundle<CONFIG extends io.dropwizard.Configuration & HasTokenConfig & HasAuthorisationConfig>
-
-