mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Nicolas Capponi
14.22.2016 5360b07bd36e6b3479c1bb3f911bb34f8d661b1f
opendj-server-legacy/src/main/java/org/opends/server/util/embedded/UpgradeParameters.java
@@ -18,16 +18,14 @@
import java.util.ArrayList;
import java.util.List;
/**
 * Parameters to upgrade a Directory Server.
 */
/** Parameters to upgrade a Directory Server. */
public final class UpgradeParameters
{
  private boolean ignoreErrors;
  private UpgradeParameters()
  {
    // private constructor to force usage of the associated Builder
    // prefer usage of static method for creation
  }
  /**
@@ -35,9 +33,9 @@
   *
   * @return this builder
   */
  public static Builder upgradeParams()
  public static UpgradeParameters upgradeParams()
  {
    return new Builder();
    return new UpgradeParameters();
  }
  /**
@@ -60,43 +58,18 @@
  }
  /**
   * Builder for the UpgradeParameters class.
   * Indicates whether errors should be ignored during the upgrade.
   * <p>
   * This option should be used with caution and may be useful in automated deployments where
   * potential errors are known in advance and resolved after the upgrade has completed
   *
   * @param ignore
   *          indicates whether errors should be ignored
   * @return this builder
   */
  public static final class Builder
  public UpgradeParameters isIgnoreErrors(boolean ignore)
  {
    private UpgradeParameters params;
    private Builder()
    {
      params = new UpgradeParameters();
    }
    /**
     * Returns the fully initialized parameters.
     *
     * @return the parameters
     */
    public UpgradeParameters toParams()
    {
      UpgradeParameters p = params;
      this.params = new UpgradeParameters();
      return p;
    }
    /**
     * Indicates whether errors should be ignored during the upgrade.
     * <p>
     * This option should be used with caution and may be useful in automated deployments where
     * potential errors are known in advance and resolved after the upgrade has completed
     *
     * @param ignore
     *          indicates whether errors should be ignored
     * @return this builder
     */
    public Builder isIgnoreErrors(boolean ignore)
    {
      params.ignoreErrors = ignore;
      return this;
    }
    ignoreErrors = ignore;
    return this;
  }
}