Options.java revision 17896349593859825d7867feb831f31376a36e01
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * The contents of this file are subject to the terms
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * of the Common Development and Distribution License
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * (the License). You may not use this file except in
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * compliance with the License.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * You can obtain a copy of the License at
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * https://opensso.dev.java.net/public/CDDLv1.0.html or
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * See the License for the specific language governing
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * permission and limitations under the License.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * When distributing Covered Code, include this CDDL
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Header Notice in each file and include the License file
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * If applicable, add the following below the CDDL Header,
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * with the fields enclosed by brackets [] replaced by
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * your own identifying information:
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * "Portions Copyrighted [year] [name of copyright owner]"
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * $Id: Options.java,v 1.7 2009/01/05 23:17:09 veiming Exp $
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * Portions Copyrighted 2011-2014 ForgeRock AS
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync public ActionLink createConfigLink = new ActionLink("upgradeLink", this, "upgrade" );
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync public ActionLink testUrlLink = new ActionLink("coexistLink", this, "coexist" );
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync public ActionLink pushConfigLink = new ActionLink("olderUpgradeLink", this, "olderUpgrade" );
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync protected boolean upgrade = false;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync protected boolean upgradeCompleted = false;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync protected boolean isOpenDS1x = false;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync protected boolean debugOn = false;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync return isNewInstall() ? "configuration.options.title" : "upgrade.title";
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync public void doInit() {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync upgradeCompleted = AMSetupServlet.isUpgradeCompleted();
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync addModel("upgradeCompleted", Boolean.valueOf(upgradeCompleted));
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync addModel("currentVersion", UpgradeUtils.getCurrentVersion());
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync isOpenDS1x = EmbeddedOpenDS.isOpenDSVer1Installed();
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync addModel("isOpenDS1x", Boolean.valueOf(isOpenDS1x));
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync debugOn = getContext().getRequest().getParameter( "debug" ) != null;
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * @return boolean If <tt>true</tt>, the options.htm page will be cusotmized for a new installation, otherwise it will be
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync * customized for an upgrade.
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync public boolean isNewInstall() {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync if (AMSetupServlet.isConfigured() && UpgradeUtils.isVersionNewer()) {
74fe172698ba936102e120dae998c9ebd09cfbdfvboxsync return true;