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-2009 Sun Microsystems, Inc.
015 * Portions Copyright 2011-2016 ForgeRock AS.
016 */
017package org.opends.quicksetup.installer.ui;
018
019import org.forgerock.i18n.LocalizableMessage;
020
021import static org.opends.messages.QuickSetupMessages.*;
022
023import org.opends.server.util.DynamicConstants;
024import org.opends.server.util.Platform;
025
026import java.awt.Component;
027
028import org.opends.quicksetup.ui.GuiApplication;
029import org.opends.quicksetup.ui.QuickSetupStepPanel;
030import org.opends.quicksetup.util.Utils;
031
032/** This panel is used to show a welcome message. */
033public class InstallWelcomePanel extends QuickSetupStepPanel
034{
035  private static final long serialVersionUID = 6209217138897900860L;
036
037  /**
038   * Default constructor.
039   * @param app Application this panel represents
040   */
041  public InstallWelcomePanel(GuiApplication app)
042  {
043    super(app);
044  }
045
046  @Override
047  protected LocalizableMessage getTitle()
048  {
049    return INFO_WELCOME_PANEL_TITLE.get();
050  }
051
052  @Override
053  protected LocalizableMessage getInstructions()
054  {
055    /*
056     * We can use org.opends.server.util.DynamicConstants without problems as it
057     * has been added to quicksetup.jar during build time.
058     */
059    return Utils.getCustomizedObject(
060          "INFO_WELCOME_PANEL_OFFLINE_INSTRUCTIONS",
061          INFO_WELCOME_PANEL_OFFLINE_INSTRUCTIONS.get(
062              DynamicConstants.SHORT_NAME,
063              DynamicConstants.SHORT_NAME,
064              Platform.JAVA_MINIMUM_VERSION_NUMBER,
065              DynamicConstants.DOC_REFERENCE_WIKI,
066              DynamicConstants.SHORT_NAME),
067          LocalizableMessage.class);
068  }
069
070  @Override
071  protected Component createInputPanel()
072  {
073    // No input in this panel
074    return null;
075  }
076}