SetupGuiLauncher.java revision a37d24d06e3d85017b59997302b89bc2017b0970
/*
* 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
* 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
* trunk/opends/resource/legal-notices/OpenDS.LICENSE. 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
*
*
* Portions Copyright 2007 Sun Microsystems, Inc.
*/
/**
* This class is called by the setup GUI 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 SetupGuiLauncher extends Launcher {
/** Prefix for log files. */
/** Suffix for log files. */
/**
* The main method which is called by the setup GUI 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 {
"org.opends.quicksetup.installer");
} catch (Throwable t) {
t.printStackTrace();
}
}
private ArgumentParser argParser;
/**
* Creates a launcher.
*
* @param args the arguments passed by the command lines.
*/
super(args);
} else {
}
}
/**
* Initialize the contents of the argument parser.
*/
protected void initializeParser()
{
false);
try
{
}
catch (ArgumentException ae)
{
}
}
/**
* {@inheritDoc}
*/
public void launch() {
if (shouldPrintVersion())
{
if (!argParser.usageOrVersionDisplayed())
{
printVersion();
}
}
else if (shouldPrintUsage()) {
if (!argParser.usageOrVersionDisplayed())
{
printUsage(false);
}
} else {
if (exitCode != 0) {
{
}
else
{
}
}
}
}
/**
* {@inheritDoc}
*/
protected boolean isCli() {
return false;
}
/**
* {@inheritDoc}
*/
public ArgumentParser getArgumentParser() {
return this.argParser;
}
/**
* {@inheritDoc}
*/
if (logFileName != null)
{
logFileName));
}
else
{
}
}
/**
* {@inheritDoc}
*/
protected void willLaunchGui() {
OfflineInstaller.class.getName());
}
/**
* {@inheritDoc}
*/
protected Message getFrameTitle() {
return INFO_FRAME_INSTALL_TITLE.get();
}
/**
* {@inheritDoc}
*/
protected CliApplication createCliApplication() {
return null;
}
}