Interface FeatureBuilder


  • @ProviderType
    public interface FeatureBuilder
    A builder for Feature Models.
    • Method Detail

      • setComplete

        FeatureBuilder setComplete​(boolean complete)
        Set the Feature Complete flag. If this method is not called the complete flag defaults to false.
        Parameters:
        complete - If the feature is complete.
        Returns:
        This builder.
      • setDescription

        FeatureBuilder setDescription​(java.lang.String description)
        Set the Feature Description.
        Parameters:
        description - The description.
        Returns:
        This builder.
      • setDocURL

        FeatureBuilder setDocURL​(java.lang.String docURL)
        Set the documentation URL.
        Parameters:
        docURL - The Documentation URL.
        Returns:
        This builder.
      • setName

        FeatureBuilder setName​(java.lang.String name)
        Set the Feature Name.
        Parameters:
        name - The Name.
        Returns:
        This builder.
      • setLicense

        FeatureBuilder setLicense​(java.lang.String license)
        Set the License.
        Parameters:
        license - The License.
        Returns:
        This builder.
      • setSCM

        FeatureBuilder setSCM​(java.lang.String scm)
        Set the SCM information.
        Parameters:
        scm - The SCM information.
        Returns:
        This builder.
      • setVendor

        FeatureBuilder setVendor​(java.lang.String vendor)
        Set the Vendor.
        Parameters:
        vendor - The Vendor.
        Returns:
        This builder.
      • addBundles

        FeatureBuilder addBundles​(FeatureBundle... bundles)
        Add Bundles to the Feature.
        Parameters:
        bundles - The Bundles to add.
        Returns:
        This builder.
      • addCategories

        FeatureBuilder addCategories​(java.lang.String... categories)
        Adds one or more categories to the Feature.
        Parameters:
        categories - The Categories.
        Returns:
        This builder.
      • addConfigurations

        FeatureBuilder addConfigurations​(FeatureConfiguration... configs)
        Add Configurations to the Feature.
        Parameters:
        configs - The Configurations to add.
        Returns:
        This builder.
      • addExtensions

        FeatureBuilder addExtensions​(FeatureExtension... extensions)
        Add Extensions to the Feature
        Parameters:
        extensions - The Extensions to add.
        Returns:
        This builder.
      • addVariable

        FeatureBuilder addVariable​(java.lang.String key,
                                   java.lang.Object defaultValue)
        Add a variable to the Feature. If a variable with the specified key already exists it is replaced with this one. Variable values are of type: String, Boolean or BigDecimal for numbers.
        Parameters:
        key - The key.
        defaultValue - The default value.
        Returns:
        This builder.
        Throws:
        java.lang.IllegalArgumentException - if the value is of an invalid type.
      • addVariables

        FeatureBuilder addVariables​(java.util.Map<java.lang.String,​java.lang.Object> variables)
        Add a map of variables to the Feature. Pre-existing variables with the same key in are overwritten if these keys exist in the map. Variable values are of type: String, Boolean or BigDecimal for numbers.
        Parameters:
        variables - to be added.
        Returns:
        This builder.
        Throws:
        java.lang.IllegalArgumentException - if a value is of an invalid type.
      • build

        Feature build()
        Build the Feature. Can only be called once on a builder. After calling this method the current builder instance cannot be used any more.
        Returns:
        The Feature.