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