SetupLauncher.java revision e7cac727a9231ff3602e61a4ea678e0463eb0e39
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2008-2010 Sun Microsystems, Inc.
* Portions Copyright 2014-2015 ForgeRock AS
*/
/**
* This class is called by the setup command line to launch the setup
* of the Directory Server. It just checks the command line arguments and the
* environment and determines whether the graphical or the command line
* based setup much be launched.
*/
public class SetupLauncher extends Launcher {
/**
* The main method which is called by the setup command lines.
*
* @param args the arguments passed by the command lines. In the case
* we want to launch the cli setup they are basically the arguments that we
* will pass to the org.opends.server.tools.InstallDS class.
*/
try {
} catch (Throwable t) {
t.printStackTrace();
}
}
private InstallDSArgumentParser argParser;
/**
* Creates a launcher.
*
* @param args the arguments passed by the command lines.
*/
super(args);
if (isWindows()) {
} else {
}
{
}
}
/**
* Initialize the contents of the argument parser.
*/
protected void initializeParser()
{
try
{
}
catch (ArgumentException ae)
{
}
}
/** {@inheritDoc} */
public void launch() {
try
{
{
}
// The second condition is required when the user specifies '?'
else if (argParser.isUsageArgumentPresent() ||
{
}
else if (isCli())
{
}
else
{
// The java version is checked in the launchGui code to be sure
// that if there is a problem with the java version the message
// (if possible) is displayed graphically.
if (exitCode != 0) {
{
}
else
{
}
}
}
}
catch (ArgumentException ae)
{
}
catch (IncompatibleVersionException ive)
{
}
}
/** {@inheritDoc} */
public ArgumentParser getArgumentParser() {
return this.argParser;
}
/** {@inheritDoc} */
if (logFileName != null)
{
logFileName));
}
else
{
}
}
/** {@inheritDoc} */
protected void willLaunchGui() {
OfflineInstaller.class.getName());
}
/** {@inheritDoc} */
protected LocalizableMessage getFrameTitle() {
LocalizableMessage.class);
}
/** {@inheritDoc} */
protected CliApplication createCliApplication() {
return null;
}
/** {@inheritDoc} */
protected boolean isCli() {
}
}