Search in sources :

Example 1 with SessionAttributeBundle

use of org.finos.legend.engine.server.core.session.SessionAttributeBundle in project legend-engine by finos.

the class Server method initialize.

@Override
public void initialize(Bootstrap<ServerConfiguration> bootstrap) {
    bootstrap.addBundle(new AssetsBundle("/web", "/", "legend_index.html"));
    bootstrap.addBundle(new SwaggerBundle<ServerConfiguration>() {

        @Override
        protected SwaggerBundleConfiguration getSwaggerBundleConfiguration(ServerConfiguration configuration) {
            return configuration.swagger;
        }
    });
    bootstrap.addBundle(new HostnameHeaderBundle());
    bootstrap.addBundle(new LegendPac4jBundle<>(serverConfiguration -> serverConfiguration.pac4j));
    bootstrap.addBundle(new SessionAttributeBundle());
    bootstrap.addBundle(new MultiPartBundle());
    PureProtocolObjectMapperFactory.withPureProtocolExtensions(bootstrap.getObjectMapper());
    VaultFactory.withVaultConfigurationExtensions(bootstrap.getObjectMapper());
    ObjectMapperFactory.withStandardConfigurations(bootstrap.getObjectMapper());
    bootstrap.getObjectMapper().registerSubtypes(new NamedType(LegendDefaultDatabaseAuthenticationFlowProviderConfiguration.class, "legendDefault"));
}
Also used : CurrentUser(org.finos.legend.engine.server.core.api.CurrentUser) ExecutePlanStrategic(org.finos.legend.engine.plan.execution.api.ExecutePlanStrategic) Memory(org.finos.legend.engine.server.core.api.Memory) SchemaExplorationApi(org.finos.legend.engine.plan.execution.stores.relational.connection.api.schema.SchemaExplorationApi) LegendPac4jBundle(org.finos.legend.server.pac4j.LegendPac4jBundle) MutableList(org.eclipse.collections.api.list.MutableList) SwaggerBundleConfiguration(io.federecio.dropwizard.swagger.SwaggerBundleConfiguration) RelationalOperationElementGrammarToJson(org.finos.legend.engine.language.pure.grammar.api.relationalOperationElement.RelationalOperationElementGrammarToJson) ExecutePlanLegacy(org.finos.legend.engine.plan.execution.api.ExecutePlanLegacy) RichIterable(org.eclipse.collections.api.RichIterable) PlanExecutor(org.finos.legend.engine.plan.execution.PlanExecutor) GenerationMode(org.finos.legend.engine.external.shared.format.extension.GenerationMode) Info(org.finos.legend.engine.server.core.api.Info) GraphQLGrammar(org.finos.legend.engine.query.graphQL.api.grammar.GraphQLGrammar) NamedType(com.fasterxml.jackson.databind.jsontype.NamedType) SchemaGenerators(org.finos.legend.engine.external.shared.format.generations.loaders.SchemaGenerators) RelationalExecutorInformation(org.finos.legend.engine.plan.execution.stores.relational.api.RelationalExecutorInformation) EnumSet(java.util.EnumSet) Application(io.dropwizard.Application) PureModel(org.finos.legend.engine.language.pure.compiler.toPureGraph.PureModel) GraphQLDebug(org.finos.legend.engine.query.graphQL.api.debug.GraphQLDebug) CollectorRegistry(io.prometheus.client.CollectorRegistry) Execute(org.finos.legend.engine.query.pure.api.Execute) ServiceLoader(java.util.ServiceLoader) FilterRegistration(javax.servlet.FilterRegistration) SwaggerBundle(io.federecio.dropwizard.swagger.SwaggerBundle) Iterate(org.eclipse.collections.impl.utility.Iterate) Root_meta_pure_router_extension_RouterExtension(org.finos.legend.pure.generated.Root_meta_pure_router_extension_RouterExtension) ApplicationQuery(org.finos.legend.engine.application.query.api.ApplicationQuery) Objects(java.util.Objects) AssetsBundle(io.dropwizard.assets.AssetsBundle) DynamicFeature(javax.ws.rs.container.DynamicFeature) ExternalFormats(org.finos.legend.engine.external.shared.format.model.api.ExternalFormats) List(java.util.List) RelationalStoreExecutor(org.finos.legend.engine.plan.execution.stores.relational.plugin.RelationalStoreExecutor) CodeGenerators(org.finos.legend.engine.external.shared.format.generations.loaders.CodeGenerators) TransformRelationalOperationElementGrammarToJson(org.finos.legend.engine.language.pure.grammar.api.relationalOperationElement.TransformRelationalOperationElementGrammarToJson) SDLCLoader(org.finos.legend.engine.language.pure.modelManager.sdlc.SDLCLoader) TransformRelationalOperationElementJsonToGrammar(org.finos.legend.engine.language.pure.grammar.api.relationalOperationElement.TransformRelationalOperationElementJsonToGrammar) ObjectMapperFactory(org.finos.legend.engine.shared.core.ObjectMapperFactory) GraphQLExecute(org.finos.legend.engine.query.graphQL.api.execute.GraphQLExecute) InflateInterceptor(org.finos.legend.engine.shared.core.operational.http.InflateInterceptor) TransformGrammarToJson(org.finos.legend.engine.language.pure.grammar.api.grammarToJson.TransformGrammarToJson) PlanGeneratorExtension(org.finos.legend.engine.plan.generation.extension.PlanGeneratorExtension) SchemaImports(org.finos.legend.engine.external.shared.format.imports.loaders.SchemaImports) ServiceStore(org.finos.legend.engine.plan.execution.stores.service.plugin.ServiceStore) LegendDefaultDatabaseAuthenticationFlowProviderConfiguration(org.finos.legend.engine.authentication.LegendDefaultDatabaseAuthenticationFlowProviderConfiguration) CatchAllExceptionMapper(org.finos.legend.engine.server.core.exceptionMappers.CatchAllExceptionMapper) Bootstrap(io.dropwizard.setup.Bootstrap) Function(org.eclipse.collections.api.block.function.Function) GrammarToJson(org.finos.legend.engine.language.pure.grammar.api.grammarToJson.GrammarToJson) Lists(org.eclipse.collections.api.factory.Lists) Vault(org.finos.legend.engine.shared.core.vault.Vault) SessionAttributeBundle(org.finos.legend.engine.server.core.session.SessionAttributeBundle) ServiceModelingApi(org.finos.legend.engine.plan.execution.service.api.ServiceModelingApi) RelationalOperationElementJsonToGrammar(org.finos.legend.engine.language.pure.grammar.api.relationalOperationElement.RelationalOperationElementJsonToGrammar) JsonToGrammar(org.finos.legend.engine.language.pure.grammar.api.jsonToGrammar.JsonToGrammar) CrossOriginFilter(org.eclipse.jetty.servlets.CrossOriginFilter) Environment(io.dropwizard.setup.Environment) CodeImports(org.finos.legend.engine.external.shared.format.imports.loaders.CodeImports) Logger(org.slf4j.Logger) Relational(org.finos.legend.engine.plan.execution.stores.relational.plugin.Relational) GenerationExtension(org.finos.legend.engine.external.shared.format.extension.GenerationExtension) ServerShared(org.finos.legend.engine.server.core.ServerShared) JsonInformationExceptionMapper(org.finos.legend.engine.server.core.exceptionMappers.JsonInformationExceptionMapper) VaultConfiguration(org.finos.legend.engine.shared.core.vault.VaultConfiguration) ListIterate(org.eclipse.collections.impl.utility.ListIterate) SessionInfo(org.finos.legend.engine.server.core.session.api.SessionInfo) SessionHandler(org.eclipse.jetty.server.session.SessionHandler) InMemory(org.finos.legend.engine.plan.execution.stores.inMemory.plugin.InMemory) MultiPartBundle(io.dropwizard.forms.MultiPartBundle) ApplicationQueryConfiguration(org.finos.legend.engine.application.query.configuration.ApplicationQueryConfiguration) TransformJsonToGrammar(org.finos.legend.engine.language.pure.grammar.api.jsonToGrammar.TransformJsonToGrammar) ModelManager(org.finos.legend.engine.language.pure.modelManager.ModelManager) DeploymentStateAndVersions(org.finos.legend.engine.shared.core.deployment.DeploymentStateAndVersions) VaultFactory(org.finos.legend.engine.shared.core.vault.VaultFactory) LegendPlanTransformers(org.finos.legend.engine.plan.generation.transformers.LegendPlanTransformers) HostnameHeaderBundle(org.finos.legend.server.shared.bundles.HostnameHeaderBundle) PureProtocolObjectMapperFactory(org.finos.legend.engine.protocol.pure.v1.PureProtocolObjectMapperFactory) DispatcherType(javax.servlet.DispatcherType) ChainFixingFilterHandler(org.finos.legend.server.shared.bundles.ChainFixingFilterHandler) SessionTracker(org.finos.legend.engine.server.core.session.SessionTracker) EngineUrlStreamHandlerFactory(org.finos.legend.engine.shared.core.url.EngineUrlStreamHandlerFactory) Compile(org.finos.legend.engine.language.pure.compiler.api.Compile) LegendDefaultDatabaseAuthenticationFlowProviderConfiguration(org.finos.legend.engine.authentication.LegendDefaultDatabaseAuthenticationFlowProviderConfiguration) MultiPartBundle(io.dropwizard.forms.MultiPartBundle) NamedType(com.fasterxml.jackson.databind.jsontype.NamedType) SessionAttributeBundle(org.finos.legend.engine.server.core.session.SessionAttributeBundle) AssetsBundle(io.dropwizard.assets.AssetsBundle) SwaggerBundleConfiguration(io.federecio.dropwizard.swagger.SwaggerBundleConfiguration) HostnameHeaderBundle(org.finos.legend.server.shared.bundles.HostnameHeaderBundle)

Aggregations

NamedType (com.fasterxml.jackson.databind.jsontype.NamedType)1 Application (io.dropwizard.Application)1 AssetsBundle (io.dropwizard.assets.AssetsBundle)1 MultiPartBundle (io.dropwizard.forms.MultiPartBundle)1 Bootstrap (io.dropwizard.setup.Bootstrap)1 Environment (io.dropwizard.setup.Environment)1 SwaggerBundle (io.federecio.dropwizard.swagger.SwaggerBundle)1 SwaggerBundleConfiguration (io.federecio.dropwizard.swagger.SwaggerBundleConfiguration)1 CollectorRegistry (io.prometheus.client.CollectorRegistry)1 EnumSet (java.util.EnumSet)1 List (java.util.List)1 Objects (java.util.Objects)1 ServiceLoader (java.util.ServiceLoader)1 DispatcherType (javax.servlet.DispatcherType)1 FilterRegistration (javax.servlet.FilterRegistration)1 DynamicFeature (javax.ws.rs.container.DynamicFeature)1 RichIterable (org.eclipse.collections.api.RichIterable)1 Function (org.eclipse.collections.api.block.function.Function)1 Lists (org.eclipse.collections.api.factory.Lists)1 MutableList (org.eclipse.collections.api.list.MutableList)1