@Override public void initialize(Bootstrap<RegisterConfiguration> bootstrap) { bootstrap.addBundle(new ViewBundle<>(ImmutableList.of(new ThymeleafViewRenderer("HTML5", "/templates/", ".html", false)))); if (isRunningOnCloudFoundry()) { bootstrap.setConfigurationSourceProvider(new UrlConfigurationSourceProvider()); } bootstrap.setConfigurationSourceProvider( new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false) )); bootstrap.addBundle(new AssetsBundle("/assets")); bootstrap.addBundle(new CorsBundle()); bootstrap.addBundle(new LogstashBundle()); System.setProperty("java.protocol.handler.pkgs", "uk.gov.register.protocols"); }
@Override public void initialize(Bootstrap<SamConfiguration> bootstrap) { final List<ViewRenderer> renderers = Arrays.asList(new MarkdownViewRenderer(), new HtmlViewRenderer(), new MustacheViewRenderer()); bootstrap.addBundle(new ViewBundle<SamConfiguration>(renderers)); bootstrap.addBundle(new AssetsBundle("/static", "/static", "index.mustache", "static")); bootstrap.addBundle(new AssetsBundle("/docs", "/docs", "index.html", "docs")); bootstrap.setConfigurationSourceProvider( new SubstitutingSourceProvider( bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor() ) ); bootstrap.addCommand(new OAuth2Command()); bootstrap.addCommand(new CreateDatabaseCommand(this)); bootstrap.addCommand(new AddTestdataCommand(this)); }
@Override public void initialize(Bootstrap<LotteryConfiguration> bootstrap) { // set up folders for static content bootstrap.addBundle(new AssetsBundle("/assets/css", "/css", null, "css")); bootstrap.addBundle(new AssetsBundle("/assets/js", "/js", null, "js")); bootstrap.addBundle(new AssetsBundle("/assets/fonts", "/fonts", null, "fonts")); bootstrap.addBundle(new AssetsBundle("/assets/html", "/html", null, "html")); // setup Freemarker views. bootstrap.addBundle(new ViewBundle()); // tag::keycloak[] bootstrap.addBundle(new KeycloakBundle<LotteryConfiguration>() { @Override protected KeycloakConfiguration getKeycloakConfiguration(LotteryConfiguration configuration) { return configuration.getKeycloakConfiguration(); } /* OPTIONAL: override getUserClass(), createAuthorizer() and createAuthenticator() if you want to use * a class other than de.ahus1.keycloak.dropwizard.User to be injected by @User*/ }); // end::keycloak[] }
@Override public void initialize(Bootstrap<ExampleBootstrapConfigration> bootstrap) { // bootstrap.addBundle(new AssetsBundle("/templates/css","/css",null,"css")); bootstrap.addBundle(new AssetsBundle("/templates/js","/js",null,"js")); bootstrap.addBundle(new AssetsBundle("/templates/fonts","/fonts",null,"fonts")); ImmutableSet<ViewRenderer> renderes= ImmutableSet.of((ViewRenderer)new ThymeleafViewRenderer()); bootstrap.addBundle(new ViewBundle(renderes)); }
@Override public void initialize(Bootstrap<CMSConfiguration> bootstrap) { bootstrap.addBundle(new ViewBundle()); bootstrap.addBundle(new AssetsBundle()); // bootstrap.addBundle(new AssetsBundle("/assets/css", "/css", null, "css")); // bootstrap.addBundle(new AssetsBundle("/assets/js", "/js", null, "js")); // bootstrap.addBundle(new AssetsBundle("/assets/fonts", "/fonts", null, "fonts")); // bootstrap.addBundle(new AssetsBundle("/assets/img", "/img", null, "img")); }
@Override public void initialize(Bootstrap<BaragonConfiguration> bootstrap) { if (!Strings.isNullOrEmpty(System.getProperty(BARAGON_DEFAULT_CONFIG_LOCATION))) { bootstrap.setConfigurationSourceProvider( new MergingConfigProvider( bootstrap.getConfigurationSourceProvider(), System.getProperty(BARAGON_DEFAULT_CONFIG_LOCATION), bootstrap.getObjectMapper(), new YAMLFactory())); } GuiceBundle<BaragonConfiguration> guiceBundle = GuiceBundle.defaultBuilder(BaragonConfiguration.class) .modules(new BaragonServiceModule()) .modules(new MetricsInstrumentationModule(bootstrap.getMetricRegistry())) .modules(new BaragonResourcesModule()) .build(); bootstrap.addBundle(new CorsBundle()); bootstrap.addBundle(new BaragonAuthBundle()); bootstrap.addBundle(guiceBundle); bootstrap.addBundle(new ViewBundle<>()); bootstrap.addBundle(new AssetsBundle("/assets/static/", "/static/")); }
@Override public void initialize(Bootstrap<ServerConfiguration> bootstrap) { bootstrap.addBundle(new MigrationsBundle<ServerConfiguration>() { @Override public DataSourceFactory getDataSourceFactory(ServerConfiguration configuration) { return configuration.getDataSourceFactory(); } }); bootstrap.addBundle(new AssetsBundle("/com/cloudwise/sap/niping/view/static", "/static", null, "static")); bootstrap.addBundle(new AssetsBundle("/com/cloudwise/sap/niping/view/vendor", "/vendor", null, "vendor")); bootstrap.addBundle(new ViewBundle<ServerConfiguration>()); }
@Override public void initialize(Bootstrap<RufusConfiguration> bootstrap) { bootstrap.addBundle(new AssetsBundle("/app", "/", "index.html")); bootstrap.addBundle(new ViewBundle<>()); bootstrap.addBundle(new MultiPartBundle()); bootstrap.addBundle(new MigrationsBundle<RufusConfiguration>() { @Override public DataSourceFactory getDataSourceFactory(RufusConfiguration conf) { return conf.getDataSourceFactory(); } }); }
@Override public void initialize(Bootstrap<FreeMarkerOnlineTesterConfiguration> bootstrap) { bootstrap.addBundle(new ViewBundle<FreeMarkerOnlineTesterConfiguration>() { @Override public Map<String, Map<String, String>> getViewConfiguration(FreeMarkerOnlineTesterConfiguration config) { return config.getViewRendererConfiguration(); } }); bootstrap.addBundle(new AssetsBundle()); bootstrap.addBundle(new RedirectBundle( new UriRedirect( "http://freemarker-online.kenshoo.com([:/].*)$", "http://try.freemarker.org$1") )); }
@Override public void initialize(final Bootstrap<T> bootstrap) { if (!Strings.isNullOrEmpty(System.getProperty(SINGULARITY_DEFAULT_CONFIGURATION_PROPERTY))) { bootstrap.setConfigurationSourceProvider(new MergingSourceProvider(bootstrap.getConfigurationSourceProvider(), System.getProperty(SINGULARITY_DEFAULT_CONFIGURATION_PROPERTY), bootstrap.getObjectMapper(), new YAMLFactory())); } final Iterable<? extends Module> additionalModules = checkNotNull(getGuiceModules(bootstrap), "getGuiceModules() returned null"); final Iterable<? extends Bundle> additionalBundles = checkNotNull(getDropwizardBundles(bootstrap), "getDropwizardBundles() returned null"); final Iterable<? extends ConfiguredBundle<T>> additionalConfiguredBundles = checkNotNull(getDropwizardConfiguredBundles(bootstrap), "getDropwizardConfiguredBundles() returned null"); final GuiceBundle<SingularityConfiguration> guiceBundle = GuiceBundle.defaultBuilder(SingularityConfiguration.class) .modules(new SingularityServiceModule()) .modules(additionalModules) .build(); bootstrap.addBundle(guiceBundle); bootstrap.addBundle(new CorsBundle()); bootstrap.addBundle(new ViewBundle()); bootstrap.addBundle(new AssetsBundle("/assets/static/", "/static/")); bootstrap.addBundle(new AssetsBundle("/assets/api-docs/", "/api-docs/", "index.html", "api-docs")); bootstrap.addBundle(new MigrationsBundle<SingularityConfiguration>() { @Override public DataSourceFactory getDataSourceFactory(final SingularityConfiguration configuration) { return configuration.getDatabaseConfiguration().get(); } }); for (Bundle bundle : additionalBundles) { bootstrap.addBundle(bundle); } for (ConfiguredBundle<T> configuredBundle : additionalConfiguredBundles) { bootstrap.addBundle(configuredBundle); } bootstrap.getObjectMapper().registerModule(new ProtobufModule()); bootstrap.getObjectMapper().registerModule(new GuavaModule()); bootstrap.getObjectMapper().setSerializationInclusion(Include.NON_NULL); bootstrap.getObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); }
@Override public void initialize(Bootstrap<IronTestConfiguration> bootstrap) { bootstrap.addBundle(new AssetsBundle("/assets/app", "/ui", "index.htm", "ui")); bootstrap.addBundle(new AssetsBundle("/META-INF/resources/webjars", "/ui/lib", null, "uilib")); bootstrap.addBundle(jaxWsBundle); bootstrap.addBundle(new MultiPartBundle()); bootstrap.addBundle(new ViewBundle<IronTestConfiguration>(){ @Override public Map<String, Map<String, String>> getViewConfiguration(IronTestConfiguration config) { return config.getViewRendererConfiguration(); } }); Configuration.setDefaults(new Configuration.Defaults() { private final JsonProvider jsonProvider = new JacksonJsonProvider(); private final MappingProvider mappingProvider = new JacksonMappingProvider(); @Override public JsonProvider jsonProvider() { return jsonProvider; } @Override public MappingProvider mappingProvider() { return mappingProvider; } @Override public Set<Option> options() { return EnumSet.noneOf(Option.class); } }); }
@Override public void initialize(Bootstrap<DwHazelcastExampleConfiguration> bootstrap) { bootstrap.addBundle(new ViewBundle<DwHazelcastExampleConfiguration>() { @Override public Map<String, Map<String, String>> getViewConfiguration(DwHazelcastExampleConfiguration config) { return config.getViewConfig(); } }); bootstrap.addBundle(new HazelcastSessionBundle<DwHazelcastExampleConfiguration>() { @Override public HazelcastSessionConfig getHazelcastSessionConfig(DwHazelcastExampleConfiguration configuration) { return configuration.getHazelcastSessionConfig(); } }); }
@Override public void initialize(Bootstrap<Config> bootstrap) { bootstrap.addBundle(new ViewBundle()); bootstrap.addBundle(new AssetsBundle("/assets/stylesheets", "/assets/stylesheets", null, "stylesheets")); bootstrap.addBundle(new AssetsBundle("/assets/javascripts", "/assets/javascripts", null, "javascripts")); bootstrap.addBundle(new AssetsBundle("/assets/images", "/assets/images", null, "images")); }
@Override public void initialize(final Bootstrap<ThirdEyeReportingConfiguration> bootstrap) { bootstrap.addBundle(new ViewBundle()); bootstrap.addBundle(new AssetsBundle("/assets/css", "/assets/css", null, "css")); bootstrap.addBundle(new AssetsBundle("/assets/js", "/assets/js", null, "js")); bootstrap.addBundle(new AssetsBundle("/assets/img", "/assets/img", null, "img")); }
@Override public void initialize(Bootstrap<ThirdEyeDashboardConfiguration> bootstrap) { bootstrap.addBundle(new ViewBundle()); bootstrap.addBundle(new AssetsBundle("/assets/css", "/assets/css", null, "css")); bootstrap.addBundle(new AssetsBundle("/assets/js", "/assets/js", null, "js")); bootstrap.addBundle(new AssetsBundle("/assets/img", "/assets/img", null, "img")); }
@Override public void initialize(Bootstrap<LotteryConfiguration> bootstrap) { // set up folders for static content bootstrap.addBundle(new AssetsBundle("/assets/css", "/css", null, "css")); bootstrap.addBundle(new AssetsBundle("/assets/js", "/js", null, "js")); bootstrap.addBundle(new AssetsBundle("/assets/fonts", "/fonts", null, "fonts")); bootstrap.addBundle(new AssetsBundle("/assets/html", "/html", null, "html")); // setup Freemarker views. bootstrap.addBundle(new ViewBundle()); }
@Override public void initialize(Bootstrap<ApplicationConfiguration> bootstrap) { bootstrap.addBundle(new AssetsBundle("/swagger/", "/docs", "index.html")); bootstrap.addBundle(new ViewBundle<ApplicationConfiguration>() { @Override public Map<String, Map<String, String>> getViewConfiguration( ApplicationConfiguration configuration) { return new HashMap<>(); } }); bootstrap.addBundle(GuiceBundle.builder() .enableAutoConfig("io.scigraph.services") .injectorFactory(factory).modules(new SciGraphApplicationModule()).build()); }
@Override public void initialize(Bootstrap<MyriadConfiguration> bootstrap) { bootstrap.addBundle(new ViewBundle()); bootstrap .addBundle(new AssetsBundle("/assets/css", "/css", null, "css")); bootstrap.addBundle(new AssetsBundle("/assets/js", "/js", null, "js")); }
@SuppressWarnings("unchecked") @Override public void initialize(Bootstrap<ThirdEyeDashboardConfiguration> bootstrap) { bootstrap.addBundle(new ViewBundle()); bootstrap.addBundle(new HelperBundle()); bootstrap.addBundle(new RedirectBundle(new PathRedirect("/", "/thirdeye"))); bootstrap.addBundle(new AssetsBundle("/app/", "/app", "index.html", "app")); bootstrap.addBundle(new AssetsBundle("/assets", "/assets", null, "assets")); bootstrap.addBundle(new AssetsBundle("/assets/css", "/assets/css", null, "css")); bootstrap.addBundle(new AssetsBundle("/assets/js", "/assets/js", null, "js")); bootstrap.addBundle(new AssetsBundle("/assets/lib", "/assets/lib", null, "lib")); bootstrap.addBundle(new AssetsBundle("/assets/img", "/assets/img", null, "img")); bootstrap.addBundle(new AssetsBundle("/assets/data", "/assets/data", null, "data")); }
@Override public void initialize(Bootstrap<ThmmyRssConfiguration> bootstrap) { bootstrap.addCommand(new RecreateTableCommand(this, "recreatetable", "Recreate the database table.")); bootstrap.addCommand(new UpdateAnnouncementsCommand(this, "updatedb", "Update the announcement database")); bootstrap.addBundle(new DBIExceptionsBundle()); bootstrap.addBundle(new AssetsBundle("/assets/", "/assets")); bootstrap.addBundle(new ViewBundle<>()); }
@Override public void initialize(Bootstrap<MediaManagerConfiguration> bootstrap) { // Enable views bootstrap.addBundle(new ViewBundle()); // Enable assets bootstrap.addBundle(new AssetsBundle()); }
@Override public void initialize(final Bootstrap<PaginationConfiguration> bootstrap) { bootstrap.addBundle(new ViewBundle<>()); }
@Override public void initialize(Bootstrap<ServerConfiguration> bootstrap) { bootstrap.addBundle(new AssetsBundle("/assets/", "/static/")); bootstrap.addBundle(new ViewBundle<>()); }
@Override public void initialize(Bootstrap<EyeballsConfiguration> bootstrap) { bootstrap.addBundle(new ViewBundle<EyeballsConfiguration>()); }
@Override public void initialize(Bootstrap<?> bootstrap) { bootstrap.addBundle(new AssetsBundle()); bootstrap.addBundle(new ViewBundle()); }
@Override public void initialize(Bootstrap<AnomalyManagementServerConfiguration> bootstrap) { bootstrap.addBundle(new ViewBundle()); }
@Override public void initialize(Bootstrap<ExpanderConfiguration> bootstrap) { bootstrap.addBundle(new AssetsBundle("/web/css", "/css", null, "css")); bootstrap.addBundle(new ViewBundle<ExpanderConfiguration>()); }
@Override public void initialize(Bootstrap<Config> bootstrap) { bootstrap.addBundle(new ViewBundle()); bootstrap.addBundle(new AssetsBundle()); }
@Override public void initialize(Bootstrap<RegurgitatorConfiguration> bootstrap) { bootstrap.addBundle(new ViewBundle()); bootstrap.addBundle(new AssetsBundle("/asset/", "/asset/")); }
@Override public void initialize(final Bootstrap<Configuration> bootstrap) { bootstrap.addBundle(new AssetsBundle()); bootstrap.addBundle(new ViewBundle()); }
@Override public void initialize(Bootstrap<BackupConfiguration> bootstrap) { bootstrap.addBundle(new AssetsBundle("/assets", "/assets", "index.htm", "assets")); bootstrap.addBundle(new AssetsBundle("/META-INF/resources/webjars", "/webjars", "index.htm", "webjars")); bootstrap.addBundle(new ViewBundle()); }
@Override public void initialize(Bootstrap<BookConfiguration> b) { b.addBundle(new ViewBundle(ImmutableList.<ViewRenderer>of(new FreemarkerViewRenderer()))); }
@Override public void initialize(Bootstrap<?> bootstrap) { bootstrap.addBundle(new ViewBundle()); bootstrap.addBundle(new AssetsBundle("/raml-docs-assets", "/api/assets", null, "raml-view")); }
@Override public void initialize(Bootstrap<OpenDataSmnConfiguration> bootstrap) { bootstrap.addBundle(new AssetsBundle()); bootstrap.addBundle(new ViewBundle()); swaggerDropwizard.onInitialize(bootstrap); }
@Override public void initialize(Bootstrap<KenshoConfiguration> bootstrap) { bootstrap.addBundle(new AssetsBundle()); bootstrap.addBundle(new ViewBundle()); }
@Override public void initialize(Bootstrap<ExampleConfiguration> bootstrap) { ImmutableSet<ViewRenderer> renderes= ImmutableSet.of((ViewRenderer)new ThymeleafViewRenderer()); bootstrap.addBundle(new ViewBundle(renderes)); }
@Override public void initialize(Bootstrap<BlogConfiguration> bootstrap) { bootstrap.addBundle(hibernateBundle); bootstrap.addBundle(new ViewBundle()); bootstrap.addBundle(new AssetsBundle("/assets/js", "/js", null, "js")); }
public Iterable<ConfiguredBundle<T>> getConfiguredBundles() { return Arrays.asList(new ViewBundle()); }
@Override public void initialize(final Bootstrap<T> bootstrap) { if (!Strings.isNullOrEmpty(System.getProperty(SINGULARITY_DEFAULT_CONFIGURATION_PROPERTY))) { bootstrap.setConfigurationSourceProvider(new MergingSourceProvider(bootstrap.getConfigurationSourceProvider(), System.getProperty(SINGULARITY_DEFAULT_CONFIGURATION_PROPERTY), bootstrap.getObjectMapper(), new YAMLFactory())); } final Iterable<? extends Module> additionalModules = checkNotNull(getGuiceModules(bootstrap), "getGuiceModules() returned null"); final Iterable<? extends Bundle> additionalBundles = checkNotNull(getDropwizardBundles(bootstrap), "getDropwizardBundles() returned null"); final Iterable<? extends ConfiguredBundle<T>> additionalConfiguredBundles = checkNotNull(getDropwizardConfiguredBundles(bootstrap), "getDropwizardConfiguredBundles() returned null"); guiceBundle = GuiceBundle.defaultBuilder(SingularityConfiguration.class) .modules(new SingularityServiceModule()) .modules(new SingularityAuthModule()) .modules(additionalModules) .build(); bootstrap.addBundle(guiceBundle); bootstrap.addBundle(new CorsBundle()); bootstrap.addBundle(new ViewBundle<>()); bootstrap.addBundle(new AssetsBundle("/assets/static/", "/static/")); bootstrap.addBundle(new AssetsBundle("/assets/api-docs/", "/api-docs/", "index.html", "api-docs")); bootstrap.addBundle(new MigrationsBundle<SingularityConfiguration>() { @Override public DataSourceFactory getDataSourceFactory(final SingularityConfiguration configuration) { return configuration.getDatabaseConfiguration().get(); } }); for (Bundle bundle : additionalBundles) { bootstrap.addBundle(bundle); } for (ConfiguredBundle<T> configuredBundle : additionalConfiguredBundles) { bootstrap.addBundle(configuredBundle); } bootstrap.getObjectMapper().registerModule(new ProtobufModule()); bootstrap.getObjectMapper().registerModule(new GuavaModule()); bootstrap.getObjectMapper().setSerializationInclusion(Include.NON_NULL); bootstrap.getObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); }