All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sdase.commons.starter.builder.InitialPlatformBundleBuilder Maven / Gradle / Ivy

Go to download

A libraries to bootstrap services easily that follow the patterns and specifications promoted by the SDA SE

There is a newer version: 7.0.87
Show newest version
package org.sdase.commons.starter.builder;

import io.dropwizard.core.Configuration;
import org.sdase.commons.server.auth.config.AuthConfigProvider;
import org.sdase.commons.server.cors.CorsConfigProvider;
import org.sdase.commons.server.opa.config.OpaConfigProvider;
import org.sdase.commons.starter.SdaPlatformBundle;
import org.sdase.commons.starter.SdaPlatformConfiguration;
import org.sdase.commons.starter.builder.CustomConfigurationProviders.AuthConfigProviderBuilder;
import org.sdase.commons.starter.builder.OpenApiCustomizer.OpenApiInitialBuilder;

public interface InitialPlatformBundleBuilder {

  /**
   * Start an application that uses the {@link SdaPlatformConfiguration} as base of it's
   * configuration file.
   *
   * @return the builder instance
   */
  OpenApiInitialBuilder usingSdaPlatformConfiguration();

  /**
   * Start an application that uses a customized configuration which extends the {@link
   * SdaPlatformConfiguration} as base of it's configuration file.
   *
   * 

The method automatically enables OPA authorization and sets therefore the authorization * configuration via {@link AuthConfigProviderBuilder#withOpaAuthorization(AuthConfigProvider, * OpaConfigProvider)} and the cors configuration via {@link * org.sdase.commons.starter.builder.CustomConfigurationProviders.CorsConfigProviderBuilder#withCorsConfigProvider(CorsConfigProvider)} * * @param configurationClass - the customized configuration of the application * @return the builder instance */ OpenApiInitialBuilder usingSdaPlatformConfiguration( Class configurationClass); /** * Start an application that uses a custom configuration has to define providers for the * configurations required by the {@link SdaPlatformBundle}. * * @param configurationClass the class that stores the configuration * @param the type of the applications configuration class * @return the builder instance */ AuthConfigProviderBuilder usingCustomConfig( Class configurationClass); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy