/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (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
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: InstallInteraction.java,v 1.3 2008/06/25 05:51:20 qcheng Exp $
*
*/
/**
*
* Interaction class to handle user input. This interaction class can handle
* all user data input related interactions including password interactions.
* This class extends UserDataInteraction and implements all the necessary
* hooks to process options and user input in interactive mode.
*
*/
/*
* Constructor for Interaction class
*
*/
super(info);
}
/*
* Method to be called for interact install @param state IStateAccess
*
* @return InteractionResult
*/
throws InstallException {
}
/*
* Method to be process user input for interactive mode
*
* @pararm userInput User input @param state IStateAccess
*
* @return InteractionResult
*/
throws InstallException {
// Invalid user input
} else {
} else {
state, true);
if (cumRes.getCumValResult()) {
// Specific warning message
}
// Store the user input
// Now copy the calc keys only if cum res = true
}
} else {
// Specific error message
}
}
}
&& (result.getIntValue() ==
}
return interResult;
}
/*
* Method to be process user option in interactive mode
*
* @pararm option UserOptionItem @param state IStateAccess
*
* @return InteractionResult
*/
result = new InteractionResult(
// Put empty value for this interaction in IStateAccess
LOC_IN_MESS_SUMMARY_DESC_FORMAT, new Object[] {
result = new InteractionResult(
}
return result;
}
return displayMessages;
}
return getMessage(STR_IN_HELP_SUFFIX);
}
/*
* This function need to now display an extra option depending on whether
* default value is present ir not. @param state
*
* @return BaseOptions
*/
throws InstallException {
if (!getInteractionInfo().getRequiredFlag()) {
// create this option only for this case
if (clearDefOpt == null) {
}
}
}
return options;
}
return getPromptSuffix();
}
return defaultValue;
}
super.setIsFirstFlag(isFirst);
// Remove the back option, beacause it was already added while
// initialization.
if (isFirst) {
}
}
// Only for isreq = false, re-process the default value
if (!getInteractionInfo().getRequiredFlag()) {
+ ", Default value = " + defaultValue);
}
if ((defaultValue != null)
defaultValue = null;
}
return defaultValue;
}
private void setDisplayMessages() {
displayMessages = new ArrayList();
}
if (getInteractionInfo().getRequiredFlag()) {
} else {
}
}
private void setPromptMessage() {
}
private void setUserOptions() {
options = new SingleLineOptions();
+ STR_IN_HELP_SUFFIX));
// At this point isFirst flag is not set. So, the back option will be
// added and it will be removed later
+ STR_IN_HELP_SUFFIX));
}
}