1047N/A/*
1047N/A * CDDL HEADER START
1047N/A *
1047N/A * The contents of this file are subject to the terms of the
1047N/A * Common Development and Distribution License, Version 1.0 only
1047N/A * (the "License"). You may not use this file except in compliance
1047N/A * with the License.
1047N/A *
1047N/A * You can obtain a copy of the license at
1047N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE
1047N/A * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
1047N/A * See the License for the specific language governing permissions
1047N/A * and limitations under the License.
1047N/A *
1047N/A * When distributing Covered Code, include this CDDL HEADER in each
1047N/A * file and include the License file at
1047N/A * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
1047N/A * add the following below this CDDL HEADER, with the fields enclosed
1047N/A * by brackets "[]" replaced with your own identifying information:
1047N/A * Portions Copyright [yyyy] [name of copyright owner]
1047N/A *
1047N/A * CDDL HEADER END
1047N/A *
1047N/A *
3215N/A * Copyright 2008 Sun Microsystems, Inc.
1047N/A */
1047N/A
1047N/Apackage org.opends.quicksetup;
1047N/A
1047N/Aimport org.opends.quicksetup.event.ProgressNotifier;
1047N/Aimport org.opends.quicksetup.util.ProgressMessageFormatter;
1047N/A
1047N/A/**
1047N/A * Represents a quick setup CLI application.
1047N/A */
1047N/Apublic interface CliApplication extends ProgressNotifier, Runnable {
1047N/A
1047N/A /**
1047N/A * Creates a set of user data from command line arguments and installation
1047N/A * status.
1907N/A * @param launcher that launched this application
1047N/A * @return UserData object populated to reflect the input args and status
3571N/A * @throws UserDataException if something is wrong with the data provided
3571N/A * by the user
3571N/A * @throws ApplicationException if there is an application specific problem
1047N/A */
1907N/A UserData createUserData(Launcher launcher)
3571N/A throws UserDataException, ApplicationException;
1047N/A
1047N/A /**
1516N/A * Gets the user data this application will use when running.
1516N/A * @return UserData to use when running
1516N/A */
1516N/A UserData getUserData();
1516N/A
1516N/A
1516N/A /**
1047N/A * Sets the user data this application will use when running.
1047N/A * @param userData UserData to use when running
1047N/A */
1047N/A void setUserData(UserData userData);
1047N/A
1047N/A /**
1047N/A * Sets the formatter that will be used to format messages.
1047N/A * @param formatter ProgressMessageFormatter used to format messages
1047N/A */
1047N/A void setProgressMessageFormatter(ProgressMessageFormatter formatter);
1047N/A
1047N/A /**
1047N/A * Gets any exception that happened while this application was running.
1047N/A * A null value returned from this method indicates that the execution
1047N/A * of the CLI program is not complete or was successful.
1047N/A * @return an exception that happened while the CLI was running
1047N/A */
1907N/A ApplicationException getRunError();
1047N/A
2324N/A /**
2324N/A * Gets the return code to return to the console.
2324N/A * @return return code to return; if null the return code indicated in the
2324N/A * error returned by <code>getRunError</code> will be used.
2324N/A */
2324N/A ReturnCode getReturnCode();
1047N/A}