001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2006-2008 Sun Microsystems, Inc.
025 *      Portions Copyright 2015 ForgeRock AS.
026 */
027package org.opends.quicksetup.installer;
028
029import org.opends.quicksetup.ProgressStep;
030
031/**
032 * Enumeration of installation steps.
033 */
034public enum InstallProgressStep implements ProgressStep {
035
036  /**
037   * Install not started.
038   */
039  NOT_STARTED,
040
041  /**
042   * Downloading the remote jar files (this step is specific to the Web Start
043   * installation).
044   */
045  DOWNLOADING,
046
047  /**
048   * Extracting the zip file (this step is specific to the Web Start
049   * installation).
050   */
051  EXTRACTING,
052
053  /**
054   * Configuring server.
055   */
056  CONFIGURING_SERVER,
057
058  /**
059   * Creating base entry for the suffix.
060   */
061  CREATING_BASE_ENTRY,
062
063  /**
064   * Importing the contents of an LDIF file into the suffix.
065   */
066  IMPORTING_LDIF,
067
068  /**
069   * Importing generated data into the suffix.
070   */
071  IMPORTING_AUTOMATICALLY_GENERATED,
072
073  /**
074   * Configuring replication.
075   */
076  CONFIGURING_REPLICATION,
077
078  /**
079   * Starting Open DS server.
080   */
081  STARTING_SERVER,
082
083  /**
084   * Stopping Open DS server.
085   */
086  STOPPING_SERVER,
087
088  /**
089   * Initialize Replicated Suffixes.
090   */
091  INITIALIZE_REPLICATED_SUFFIXES,
092
093  /**
094   * Configuring ADS.
095   */
096  CONFIGURING_ADS,
097
098  /**
099   * Enabling Windows service.
100   */
101  ENABLING_WINDOWS_SERVICE,
102
103  /**
104   * User is waiting for current task to finish
105   * so that the operation can be canceled.
106   */
107  WAITING_TO_CANCEL,
108
109  /**
110   * Canceling install.
111   */
112  CANCELING,
113
114  /**
115   * Installation finished successfully.
116   */
117  FINISHED_SUCCESSFULLY,
118
119  /**
120   * User canceled installation.
121   */
122  FINISHED_CANCELED,
123
124  /**
125   * Installation finished with an error.
126   */
127  FINISHED_WITH_ERROR;
128
129  /** {@inheritDoc} */
130  public boolean isLast() {
131    return this == FINISHED_SUCCESSFULLY ||
132            this == FINISHED_CANCELED ||
133    this == FINISHED_WITH_ERROR;
134  }
135
136  /** {@inheritDoc} */
137  public boolean isError() {
138    return this.equals(FINISHED_WITH_ERROR);
139  }
140}