Package org.opends.quicksetup.ui
Class QuickSetup
- java.lang.Object
-
- org.opends.quicksetup.ui.QuickSetup
-
- All Implemented Interfaces:
ButtonActionListener,ProgressUpdateListener
public class QuickSetup extends Object implements ButtonActionListener, ProgressUpdateListener
This class is responsible for doing the following:- Check whether we are installing or uninstalling.
- Performs all the checks and validation of the data provided by the user during the setup.
- It will launch also the installation once the user clicks on 'Finish' if we are installing the product.
-
-
Constructor Summary
Constructors Constructor Description QuickSetup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuttonActionPerformed(ButtonEvent ev)ButtonActionListener implementation.voiddisplay()This method displays the setup dialog.booleandisplayConfirmation(org.forgerock.i18n.LocalizableMessage msg, org.forgerock.i18n.LocalizableMessage title)Displays a confirmation message dialog.voiddisplayError(org.forgerock.i18n.LocalizableMessage msg, org.forgerock.i18n.LocalizableMessage title)Displays an error message dialog.voiddisplayFieldInvalid(FieldName fieldName, boolean invalid)Marks the fieldName as valid or invalid depending on the value of the invalid parameter.QuickSetupDialoggetDialog()Get the dialog that is displayed.StringgetFieldStringValue(FieldName fieldName)Gets the string value for a given field name.ObjectgetFieldValue(FieldName fieldName)Gets the value for a given field name.voidinitialize(Supplier<TempLogFile> tempLogFile, String[] args)This method creates the install/uninstall dialogs and to check the current install status.voidlaunch()Launch the QuickSetup application Open DS.voidprogressUpdate(ProgressUpdateEvent ev)ProgressUpdateListener implementation.voidquit()Method called when we want to quit the setup (for instance when the user clicks on 'Close' or 'Quit' buttons and has confirmed that (s)he wants to quit the program.voidsetCurrentStep(WizardStep step)Set the current step.
-
-
-
Method Detail
-
initialize
public void initialize(Supplier<TempLogFile> tempLogFile, String[] args)
This method creates the install/uninstall dialogs and to check the current install status. This method must be called outside the event thread because it can perform long operations which can make the user think that the UI is blocked.- Parameters:
tempLogFile- supplies the temporary log file where messages will be logged. The wizard does not create it: the application does, when it starts the operation, so that a wizard the user quits leaves no log behind (issue #1030).args- for the moment this parameter is not used but we keep it in order to (in case of need) pass parameters through the command line.
-
display
public void display()
This method displays the setup dialog. This method must be called from the event thread.
-
buttonActionPerformed
public void buttonActionPerformed(ButtonEvent ev)
ButtonActionListener implementation. It assumes that we are called in the event thread.- Specified by:
buttonActionPerformedin interfaceButtonActionListener- Parameters:
ev- the ButtonEvent we receive.
-
progressUpdate
public void progressUpdate(ProgressUpdateEvent ev)
ProgressUpdateListener implementation. Here we take the ProgressUpdateEvent and create a ProgressDescriptor that will be used to update the progress dialog.- Specified by:
progressUpdatein interfaceProgressUpdateListener- Parameters:
ev- the ProgressUpdateEvent we receive.- See Also:
runDisplayUpdater()
-
quit
public void quit()
Method called when we want to quit the setup (for instance when the user clicks on 'Close' or 'Quit' buttons and has confirmed that (s)he wants to quit the program.
-
launch
public void launch()
Launch the QuickSetup application Open DS.
-
setCurrentStep
public void setCurrentStep(WizardStep step)
Set the current step. This will basically make the required calls in the dialog to display the panel that corresponds to the step passed as argument.- Parameters:
step- The step to be displayed.
-
getDialog
public QuickSetupDialog getDialog()
Get the dialog that is displayed.- Returns:
- the dialog.
-
displayError
public void displayError(org.forgerock.i18n.LocalizableMessage msg, org.forgerock.i18n.LocalizableMessage title)Displays an error message dialog.- Parameters:
msg- the error message.title- the title for the dialog.
-
displayConfirmation
public boolean displayConfirmation(org.forgerock.i18n.LocalizableMessage msg, org.forgerock.i18n.LocalizableMessage title)Displays a confirmation message dialog.- Parameters:
msg- the confirmation message.title- the title of the dialog.- Returns:
trueif the user confirms the message, orfalseif not.
-
getFieldStringValue
public String getFieldStringValue(FieldName fieldName)
Gets the string value for a given field name.- Parameters:
fieldName- the field name object.- Returns:
- the string value for the field name.
-
getFieldValue
public Object getFieldValue(FieldName fieldName)
Gets the value for a given field name.- Parameters:
fieldName- the field name object.- Returns:
- the value for the field name.
-
displayFieldInvalid
public void displayFieldInvalid(FieldName fieldName, boolean invalid)
Marks the fieldName as valid or invalid depending on the value of the invalid parameter. With the current implementation this implies basically using a red color in the label associated with the fieldName object. The color/style used to mark the label invalid is specified in UIFactory.- Parameters:
fieldName- the field name object.invalid- whether to mark the field valid or invalid.
-
-