Class BrowserlessConfiguration.Builder

    • Constructor Detail

    • 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 null
        value - the property value, 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 null
        enabled - 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 null
        enabled - 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