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>

  • Type Parameters:
    CONFIG - The configuration class
    DOC_REF_POJO - POJO class for the Document
    QUERY_SERVICE - Implementation class for the Query Service
    DOC_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 the QueryEventLoggingService 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.
    • 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 interface io.dropwizard.ConfiguredBundle<CONFIG extends io.dropwizard.Configuration & HasTokenConfig & HasAuthorisationConfig>
      • run

        public void run​(CONFIG configuration,
                        io.dropwizard.setup.Environment environment)
        Specified by:
        run in interface io.dropwizard.ConfiguredBundle<CONFIG extends io.dropwizard.Configuration & HasTokenConfig & HasAuthorisationConfig>