001/*
002 * The contents of this file are subject to the terms of the Common Development and
003 * Distribution License (the License). You may not use this file except in compliance with the
004 * License.
005 *
006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
007 * specific language governing permission and limitations under the License.
008 *
009 * When distributing Covered Software, include this CDDL Header Notice in each file and include
010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
011 * Header, with the fields enclosed by brackets [] replaced by your own identifying
012 * information: "Portions Copyright [year] [name of copyright owner]".
013 *
014 * Copyright 2006-2008 Sun Microsystems, Inc.
015 * Portions Copyright 2015 ForgeRock AS.
016 */
017package org.opends.guitools.uninstaller;
018
019import org.opends.quicksetup.ProgressStep;
020
021/** Enumeration of steps for an uninstall process. */
022public enum UninstallProgressStep implements ProgressStep {
023
024  /** Uninstall not started. */
025  NOT_STARTED,
026  /** Unconfiguring replication in remote servers. */
027  UNCONFIGURING_REPLICATION,
028  /** Stopping server. */
029  STOPPING_SERVER,
030  /** Disabling Windows Service. */
031  DISABLING_WINDOWS_SERVICE,
032  /** Removing External Database files. */
033  DELETING_EXTERNAL_DATABASE_FILES,
034  /** Removing External Log files. */
035  DELETING_EXTERNAL_LOG_FILES,
036  /** Removing external references. */
037  REMOVING_EXTERNAL_REFERENCES,
038  /** Removing installation files. */
039  DELETING_INSTALLATION_FILES,
040  /** Installation finished successfully. */
041  FINISHED_SUCCESSFULLY,
042  /** Installation finished with a non critical error updating remote servers. */
043  FINISHED_WITH_ERROR_ON_REMOTE,
044  /** Installation finished but not all the files could be deleted. */
045  FINISHED_WITH_ERROR_DELETING,
046  /** Installation finished with an error. */
047  FINISHED_WITH_ERROR;
048
049  /** {@inheritDoc} */
050  public boolean isLast() {
051    return this == FINISHED_SUCCESSFULLY ||
052    this == FINISHED_WITH_ERROR ||
053    this == FINISHED_WITH_ERROR_ON_REMOTE ||
054    this == FINISHED_WITH_ERROR_DELETING;
055  }
056
057  /** {@inheritDoc} */
058  public boolean isError() {
059    return this.equals(FINISHED_WITH_ERROR);
060  }
061}