Interface FeatureBuilder


@ProviderType public interface FeatureBuilder
A builder for Feature Models.
"NotThreadSafe"
  • Method Details

    • 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(String description)
      Set the Feature Description.
      Parameters:
      description - The description.
      Returns:
      This builder.
    • setDocURL

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

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

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

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

      FeatureBuilder setVendor(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(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(String key, 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:
      IllegalArgumentException - if the value is of an invalid type.
    • addVariables

      FeatureBuilder addVariables(Map<String,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:
      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.