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-2010 Sun Microsystems, Inc. 015 * Portions Copyright 2014-2016 ForgeRock AS. 016 */ 017package org.opends.quicksetup; 018 019import org.forgerock.i18n.LocalizableMessage; 020import static org.opends.messages.QuickSetupMessages.*; 021 022/** 023 * This enumeration just represents the different steps that we can have in 024 * the installation and uninstallation wizards. 025 */ 026public enum Step implements WizardStep 027{ 028 /** Welcome step for the installation. */ 029 WELCOME(INFO_WELCOME_STEP.get()), 030 031 /** License approval step for the installation. */ 032 LICENSE(INFO_LICENSE_STEP.get()), 033 034 /** Confirmation panel for the uninstallation. */ 035 CONFIRM_UNINSTALL(INFO_CONFIRM_UNINSTALL_STEP.get()), 036 037 /** Server Settings step (path, port, etc.). */ 038 SERVER_SETTINGS(INFO_SERVER_SETTINGS_STEP.get()), 039 040 /** Data Replication panel (standalone or replicated). */ 041 REPLICATION_OPTIONS(INFO_DATA_REPLICATION_STEP.get()), 042 /** Global Administrator creation panel. */ 043 CREATE_GLOBAL_ADMINISTRATOR(INFO_CREATE_GLOBAL_ADMINISTRATOR_STEP.get()), 044 /** Suffixes to Replicate. */ 045 SUFFIXES_OPTIONS(INFO_SUFFIXES_STEP.get()), 046 /** 047 * Panel when the user specifies the replication ports of the remote servers 048 * that have not defined it. 049 */ 050 REMOTE_REPLICATION_PORTS(INFO_REMOTE_REPLICATION_PORTS_STEP.get()), 051 /** Data Options panel (suffix dn, LDIF path, etc.). */ 052 NEW_SUFFIX_OPTIONS(INFO_DATA_OPTIONS_STEP.get()), 053 054 /** Runtime options panel for the install. */ 055 RUNTIME_OPTIONS(INFO_JAVA_RUNTIME_OPTIONS_PANEL_STEP.get()), 056 057 /** Review panel for the install. */ 058 REVIEW(INFO_REVIEW_STEP.get()), 059 060 /** Progress panel. */ 061 PROGRESS(INFO_PROGRESS_STEP.get()), 062 063 /** Finished panel. */ 064 FINISHED(INFO_FINISHED_STEP.get()); 065 066 private LocalizableMessage msg; 067 068 /** 069 * Creates a step. 070 * @param msg the message key used to access a message catalog to 071 * retrieve this step's display name 072 */ 073 Step(LocalizableMessage msg) { 074 this.msg = msg; 075 } 076 077 /** 078 * Gets this steps message key. 079 * @return String message key used to access a message catalog to 080 * retrieve this step's display name 081 */ 082 @Override 083 public LocalizableMessage getDisplayMessage() { 084 return msg; 085 } 086 087 @Override 088 public boolean isProgressStep() { 089 return this == PROGRESS; 090 } 091 092 @Override 093 public boolean isFinishedStep() { 094 return this == FINISHED; 095 } 096 097 @Override 098 public boolean isLicenseStep() { 099 return this == LICENSE; 100 } 101 102}