Class BrowserlessConfiguration.Builder
-
- All Implemented Interfaces:
public final class BrowserlessConfiguration.BuilderBuilder for BrowserlessConfiguration instances.
-
-
Method Summary
Modifier and Type Method Description BrowserlessConfiguration.BuilderwithApplicationProperty(String name, String value)Sets a Vaadin application property (init parameter) to apply to the mock Vaadin environment. BrowserlessConfiguration.BuilderwithApplicationProperties(Map<String, String> properties)Sets Vaadin application properties (init parameters) to apply to the mock Vaadin environment. BrowserlessConfiguration.BuilderwithFeatureFlags(Array<String> featureIds)Enables the given Vaadin feature flags, overriding the values potentially defined in the vaadin-featureflags. BrowserlessConfiguration.BuilderwithFeatureFlags(Array<Feature> features)Enables the given Vaadin feature flags, overriding the values potentially defined in the vaadin-featureflags. BrowserlessConfiguration.BuilderwithFeatureFlag(String featureId, boolean enabled)Enables or disables the given Vaadin feature flag, overriding the value potentially defined in the vaadin-featureflags. BrowserlessConfiguration.BuilderwithFeatureFlag(Feature feature, boolean enabled)Enables or disables the given Vaadin feature flag, overriding the value potentially defined in the vaadin-featureflags. BrowserlessConfiguration.BuilderwithLookupServices(Array<Class<out Object>> services)Adds the given service implementation classes to the ones used to initialize the Vaadin com.vaadin.flow.di.Lookup, such as com.vaadin.flow.di.InstantiatorFactory or com.vaadin.flow.di.ResourceProvider implementations. BrowserlessConfiguration.BuilderwithConfiguration(BrowserlessConfiguration configuration)Applies all entries of the given configuration to this builder, replacing previously set application properties and feature flags with the same names, and accumulating lookup services. BrowserlessConfigurationbuild()Builds the configuration. -
-
Method Detail
-
withApplicationProperty
BrowserlessConfiguration.Builder withApplicationProperty(String name, String value)
Sets a Vaadin application property (init parameter) to apply to the mock Vaadin environment. A previously set value for the same name is replaced.
- Parameters:
name- the property name, not nullvalue- the property value, not null- Returns:
this builder
-
withApplicationProperties
BrowserlessConfiguration.Builder withApplicationProperties(Map<String, String> properties)
Sets Vaadin application properties (init parameters) to apply to the mock Vaadin environment. Previously set values for the same names are replaced.
- Parameters:
properties- the properties to set, not null- Returns:
this builder
-
withFeatureFlags
BrowserlessConfiguration.Builder withFeatureFlags(Array<String> featureIds)
Enables the given Vaadin feature flags, overriding the values potentially defined in the vaadin-featureflags.properties file or in system properties.
- Parameters:
featureIds- the identifiers of the features to enable, not null- Returns:
this builder
-
withFeatureFlags
BrowserlessConfiguration.Builder withFeatureFlags(Array<Feature> features)
Enables the given Vaadin feature flags, overriding the values potentially defined in the vaadin-featureflags.properties file or in system properties.
- Parameters:
features- the features to enable, not null- Returns:
this builder
-
withFeatureFlag
BrowserlessConfiguration.Builder withFeatureFlag(String featureId, boolean enabled)
Enables or disables the given Vaadin feature flag, overriding the value potentially defined in the vaadin-featureflags.properties file or in system properties.
- Parameters:
featureId- the identifier of the feature, not nullenabled- true to enable the feature, false to disable it- Returns:
this builder
-
withFeatureFlag
BrowserlessConfiguration.Builder withFeatureFlag(Feature feature, boolean enabled)
Enables or disables the given Vaadin feature flag, overriding the value potentially defined in the vaadin-featureflags.properties file or in system properties.
- Parameters:
feature- the feature, not nullenabled- true to enable the feature, false to disable it- Returns:
this builder
-
withLookupServices
BrowserlessConfiguration.Builder withLookupServices(Array<Class<out Object>> services)
Adds the given service implementation classes to the ones used to initialize the Vaadin com.vaadin.flow.di.Lookup, such as com.vaadin.flow.di.InstantiatorFactory or com.vaadin.flow.di.ResourceProvider implementations.
Successive calls accumulate; lookup services are never replaced. Calling with no arguments is a no-op.
- Parameters:
services- the service implementation classes to add, not null- Returns:
this builder
-
withConfiguration
BrowserlessConfiguration.Builder withConfiguration(BrowserlessConfiguration configuration)
Applies all entries of the given configuration to this builder, replacing previously set application properties and feature flags with the same names, and accumulating lookup services.
- Parameters:
configuration- the configuration to apply, not null- Returns:
this builder
-
build
BrowserlessConfiguration build()
Builds the configuration.
- Returns:
a new configuration, never null
-
-
-
-