Class FeatureInstallOptions.Builder

java.lang.Object
de.espirit.firstspirit.feature.FeatureInstallOptions.Builder
Enclosing interface:
FeatureInstallOptions

public static class FeatureInstallOptions.Builder extends Object
A builder for streamlined creation of FeatureInstallOptions.
Since:
5.2.231104
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • withNameBasedLayerMapping

      @NotNull public @NotNull FeatureInstallOptions.Builder withNameBasedLayerMapping(@Nullable @Nullable Map<String,String> layerMapping)
      Set a layer mapping using source and target layer names. This method allows you to specify a layer mapping by providing a map where the keys represent source layer names and the corresponding values represent target layer names. It helps customize how layers are mapped during a feature installation process.
      Parameters:
      layerMapping - a mapping of source layer names to target layer names.
      Returns:
      the current FeatureInstallOptions.Builder instance for method chaining.
      Since:
      5.2.231104
    • withLayerMapper

      @NotNull public @NotNull FeatureInstallOptions.Builder withLayerMapper(@Nullable @Nullable LayerMapper layerMapper)
      Set a layer mapper for customizing how layers are mapped during a feature installation process. This method allows you to define a specific layer mapper such as e.g. LayerMapper.CREATE_NEW_DEFAULT_LAYER_MAPPER or LayerMapper.SchemaUidBasedLayerMapper. Ensure that the given LayerMapper is loadable by FirstSpirit's class loader.
      Parameters:
      layerMapper - a LayerMapper which must be serializable and loadable by FirstSpirit's class loader.
      Returns:
      the current FeatureInstallOptions.Builder instance for method chaining.
      Since:
      5.2.231104
    • installFeatureModel

      @NotNull public @NotNull FeatureInstallOptions.Builder installFeatureModel(boolean installFeatureModel)
      Set whether the feature model, which contains metadata about content transported by the feature, should be created or updated in the target project immediately after the feature installation process. This method allows you to specify whether the feature model should be created or updated in the target project. Pass true to indicate that it should be created or updated, and false to indicate otherwise.
      Parameters:
      installFeatureModel - true if the feature model should be created or updated, false otherwise.
      Returns:
      the current FeatureInstallOptions.Builder instance for method chaining.
      Since:
      5.2.231104
    • importIDProviderGIDs

      @NotNull public @NotNull FeatureInstallOptions.Builder importIDProviderGIDs(boolean importIDProviderGIDs)
      Specify whether the GIDs of the imported/updated IDProviders should be imported/updated during the feature installation process.
      Parameters:
      importIDProviderGIDs - true if the GIDs should be imported/updated, false otherwise.
      Returns:
      the current FeatureInstallOptions.Builder instance.
      Since:
      5.2.240102
    • build

      @NotNull public @NotNull FeatureInstallOptions build(@NotNull @NotNull FeatureFile featureFile)
      Create FeatureInstallOptions for the installation of a feature represented by the given FeatureFile. This method constructs FeatureInstallOptions tailored for the installation of the specified feature, which is represented by the provided FeatureFile.
      Parameters:
      featureFile - a FeatureFile representing the feature to be installed.
      Returns:
      FeatureInstallOptions configured for installing the feature represented by the FeatureFile.
      Since:
      5.2.231104