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