Package org.opends.guitools.uninstaller
Class Uninstaller
- java.lang.Object
-
- org.opends.quicksetup.Application
-
- org.opends.quicksetup.ui.GuiApplication
-
- org.opends.guitools.uninstaller.Uninstaller
-
- All Implemented Interfaces:
Runnable,CliApplication,ProgressNotifier
public class Uninstaller extends GuiApplication implements CliApplication
This class is in charge of performing the uninstallation of Open DS.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opends.quicksetup.Application
Application.ErrorPrintStream, Application.OutputPrintStream, Application.PointAdder
-
-
Field Summary
-
Fields inherited from class org.opends.quicksetup.Application
formatter, installStatus, tempLogFile
-
-
Constructor Summary
Constructors Constructor Description Uninstaller()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()Signals that the application should cancel a currently running operation as soon as possible and return the environment to the state prior to running the operation.booleancanFinish(WizardStep step)Indicates whether the user is allowed to finish the wizard fromstep.booleancanGoBack(WizardStep step)Indicates whether the user is allowed to return to a previous step fromstep.booleancanGoForward(WizardStep step)Indicates whether the user is allowed to move to a new step fromstep.booleancanQuit(WizardStep step)Whether the provided wizard step allow to quit.voidcloseClicked(WizardStep cStep, QuickSetup qs)Called when the user has clicked the 'close' button.UserDatacreateUserData()Creates a set of user data with default values.UserDatacreateUserData(Launcher launcher)Creates a set of user data from command line arguments and installation status.QuickSetupStepPanelcreateWizardStepPanel(WizardStep step)Creates a wizard panel given a specific step.booleanfinishClicked(WizardStep cStep, QuickSetup qs)Called when the user has clicked the 'finish' button.booleanfinishOnLeft()Indicates whether the finish button must be placed on the left (close to "Next" button) or on the right (close to "Quit" button).org.forgerock.i18n.LocalizableMessagegetCloseButtonToolTip()Gets the key for the close button's tool tip text.UninstallProgressStepgetCurrentProgressStep()Gets the current step.org.forgerock.i18n.LocalizableMessagegetFinishButtonLabel()Gets the key for the finish button's label.org.forgerock.i18n.LocalizableMessagegetFinishButtonToolTip()Gets the key for the finish button's tool tip text.WizardStepgetFinishedStep()Gets the finished step in the wizard.WizardStepgetFirstWizardStep()Returns the initial wizard step.org.forgerock.i18n.LocalizableMessagegetFrameTitle()Gets the frame title of the GUI application that will be used in some operating systems.ButtonNamegetInitialFocusButtonName()Get the name of the button that will receive initial focus.StringgetInstallationPath()Returns the installation path.StringgetInstancePath()Returns the instance path.WizardStepgetNextWizardStep(WizardStep step)Gets the next step in the wizard given a current step.WizardStepgetPreviousWizardStep(WizardStep step)Gets the previous step in the wizard given a current step.IntegergetRatio(ProgressStep step)Returns an integer that specifies which percentage of the whole installation has been completed.ReturnCodegetReturnCode()Gets the return code to return to the console.ApplicationExceptiongetRunError()Returns the ApplicationException that might occur during installation ornullif no exception occurred.org.forgerock.i18n.LocalizableMessagegetSummary(ProgressStep step)Returns an formatted representation of the summary for the specified UninstallProgressStep.ApplicationTrustManagergetTrustManager()Returns the trust manager that can be used to establish secure connections.Set<? extends WizardStep>getWizardSteps()Returns the set of wizard steps used in this application's wizard.booleanisCancellable()Indicates whether this application is capable of cancelling the operation performed in the run method.booleanisFinished()Returns whether the installer has finished or not.voidnextClicked(WizardStep cStep, QuickSetup qs)Called when the user has clicked the 'next' button.voidnotifyListeners(Integer ratio, org.forgerock.i18n.LocalizableMessage currentPhaseSummary, org.forgerock.i18n.LocalizableMessage newLogDetail)This method notifies the ProgressUpdateListeners that there was an update in the installation progress.voidpreviousClicked(WizardStep cStep, QuickSetup qs)Called when the user has clicked the 'previous' button.voidquitClicked(WizardStep step, QuickSetup qs)Called when the user has clicked the 'quit' button.voidrun()Actually performs the uninstall in this thread.voidsetWizardDialogState(QuickSetupDialog dlg, UserData userData, WizardStep step)Called when the user advances to new step in the wizard.voidupdateUserData(WizardStep step, QuickSetup qs)Called whenever this application should update its user data from values found in QuickSetup.voidwindowClosing(QuickSetupDialog dlg, WindowEvent evt)Called by the controller when the window is closing.-
Methods inherited from class org.opends.quicksetup.ui.GuiApplication
acceptCertificateForException, confirmCancel, createFramePanel, forceToDisplay, getCurrentWizardStep, getExtraDialogHeight, getOrderedSteps, getQuitButtonToolTip, getTab, getUserArguments, isSubStep, isVisible, isVisible, setDisplayedWizardStep, setQuickSetupDialog, setUserArguments
-
Methods inherited from class org.opends.quicksetup.Application
addProgressUpdateListener, applicationPrintStreamReceived, checkAbort, create, getApplicationErrorStream, getApplicationOutputStream, getFormattedDone, getFormattedDoneWithLineBreak, getFormattedError, getFormattedError, getFormattedLog, getFormattedLogError, getFormattedProgress, getFormattedProgressWithLineBreak, getFormattedSuccess, getFormattedSummary, getFormattedWarning, getFormattedWithPoints, getInstallation, getLineBreak, getMessage, getProgressMessageFormatter, getRemoteConnection, getTaskSeparator, getUserData, isVerbose, notifyListeners, notifyListenersDone, notifyListenersRatioChange, notifyListenersWithPoints, openTempLogFile, removeProgressUpdateListener, setCurrentInstallStatus, setInstallation, setNotifyListeners, setProgressMessageFormatter, setTempLogFile, setUserData
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opends.quicksetup.CliApplication
getUserData, setProgressMessageFormatter, setUserData
-
Methods inherited from interface org.opends.quicksetup.event.ProgressNotifier
addProgressUpdateListener, removeProgressUpdateListener
-
-
-
-
Method Detail
-
getFrameTitle
public org.forgerock.i18n.LocalizableMessage getFrameTitle()
Description copied from class:GuiApplicationGets the frame title of the GUI application that will be used in some operating systems.- Specified by:
getFrameTitlein classGuiApplication- Returns:
- internationalized String representing the frame title
-
createUserData
public UserData createUserData()
Description copied from class:ApplicationCreates a set of user data with default values.- Overrides:
createUserDatain classApplication- Returns:
- UserData empty set of UserData
-
getFirstWizardStep
public WizardStep getFirstWizardStep()
Description copied from class:GuiApplicationReturns the initial wizard step.- Specified by:
getFirstWizardStepin classGuiApplication- Returns:
- Step representing the first step to show in the wizard
-
getNextWizardStep
public WizardStep getNextWizardStep(WizardStep step)
Description copied from class:GuiApplicationGets the next step in the wizard given a current step.- Specified by:
getNextWizardStepin classGuiApplication- Parameters:
step- Step the current step- Returns:
- Step the next step
-
getPreviousWizardStep
public WizardStep getPreviousWizardStep(WizardStep step)
Description copied from class:GuiApplicationGets the previous step in the wizard given a current step.- Specified by:
getPreviousWizardStepin classGuiApplication- Parameters:
step- Step the current step- Returns:
- Step the previous step
-
getFinishedStep
public WizardStep getFinishedStep()
Description copied from class:GuiApplicationGets the finished step in the wizard.- Specified by:
getFinishedStepin classGuiApplication- Returns:
- Step the finished step
-
finishOnLeft
public boolean finishOnLeft()
Description copied from class:GuiApplicationIndicates whether the finish button must be placed on the left (close to "Next" button) or on the right (close to "Quit" button).- Overrides:
finishOnLeftin classGuiApplication- Returns:
trueif the finish button must be placed on the left andfalseotherwise.
-
canGoBack
public boolean canGoBack(WizardStep step)
Description copied from class:GuiApplicationIndicates whether the user is allowed to return to a previous step fromstep.- Overrides:
canGoBackin classGuiApplication- Parameters:
step- WizardStep for which the the return value indicates whether or not the user can return to a previous step- Returns:
- boolean where true indicates the user can return to a previous
step from
step
-
canGoForward
public boolean canGoForward(WizardStep step)
Description copied from class:GuiApplicationIndicates whether the user is allowed to move to a new step fromstep.- Overrides:
canGoForwardin classGuiApplication- Parameters:
step- WizardStep for which the the return value indicates whether or not the user can move to a new step- Returns:
- boolean where true indicates the user can move to a new
step from
step
-
canFinish
public boolean canFinish(WizardStep step)
Description copied from class:GuiApplicationIndicates whether the user is allowed to finish the wizard fromstep.- Specified by:
canFinishin classGuiApplication- Parameters:
step- WizardStep for which the the return value indicates whether or not the user can finish the wizard- Returns:
- boolean where true indicates the user can finish the wizard
-
canQuit
public boolean canQuit(WizardStep step)
Whether the provided wizard step allow to quit.- Parameters:
step- the wizard step- Returns:
- true if the provided wizard step allow to quit, false otherwise
-
nextClicked
public void nextClicked(WizardStep cStep, QuickSetup qs)
Description copied from class:GuiApplicationCalled when the user has clicked the 'next' button.- Specified by:
nextClickedin classGuiApplication- Parameters:
cStep- WizardStep at which the user clicked the next buttonqs- QuickSetup controller
-
closeClicked
public void closeClicked(WizardStep cStep, QuickSetup qs)
Description copied from class:GuiApplicationCalled when the user has clicked the 'close' button.- Overrides:
closeClickedin classGuiApplication- Parameters:
cStep- WizardStep at which the user clicked the close buttonqs- QuickSetup controller
-
quitClicked
public void quitClicked(WizardStep step, QuickSetup qs)
Description copied from class:GuiApplicationCalled when the user has clicked the 'quit' button.- Overrides:
quitClickedin classGuiApplication- Parameters:
step- WizardStep at which the user clicked the quit buttonqs- QuickSetup controller
-
getCloseButtonToolTip
public org.forgerock.i18n.LocalizableMessage getCloseButtonToolTip()
Description copied from class:GuiApplicationGets the key for the close button's tool tip text.- Overrides:
getCloseButtonToolTipin classGuiApplication- Returns:
- String key of the text in the resource bundle
-
getFinishButtonToolTip
public org.forgerock.i18n.LocalizableMessage getFinishButtonToolTip()
Description copied from class:GuiApplicationGets the key for the finish button's tool tip text.- Overrides:
getFinishButtonToolTipin classGuiApplication- Returns:
- String key of the text in the resource bundle
-
getFinishButtonLabel
public org.forgerock.i18n.LocalizableMessage getFinishButtonLabel()
Description copied from class:GuiApplicationGets the key for the finish button's label.- Overrides:
getFinishButtonLabelin classGuiApplication- Returns:
- String key of the text in the resource bundle
-
previousClicked
public void previousClicked(WizardStep cStep, QuickSetup qs)
Description copied from class:GuiApplicationCalled when the user has clicked the 'previous' button.- Specified by:
previousClickedin classGuiApplication- Parameters:
cStep- WizardStep at which the user clicked the previous buttonqs- QuickSetup controller
-
notifyListeners
public void notifyListeners(Integer ratio, org.forgerock.i18n.LocalizableMessage currentPhaseSummary, org.forgerock.i18n.LocalizableMessage newLogDetail)
Description copied from class:ApplicationThis method notifies the ProgressUpdateListeners that there was an update in the installation progress.- Specified by:
notifyListenersin interfaceProgressNotifier- Overrides:
notifyListenersin classApplication- Parameters:
ratio- the integer that specifies which percentage of the whole installation has been completed.currentPhaseSummary- the localized summary message for the current installation progress in formatted form.newLogDetail- the new log messages that we have for the installation in formatted form.
-
finishClicked
public boolean finishClicked(WizardStep cStep, QuickSetup qs)
Description copied from class:GuiApplicationCalled when the user has clicked the 'finish' button.- Specified by:
finishClickedin classGuiApplication- Parameters:
cStep- WizardStep at which the user clicked the previous buttonqs- QuickSetup controller- Returns:
- boolean that the application uses to indicate the the application should be launched. If false, the application is responsible for updating the user data for the final screen and launching the application if this is the desired behavior.
-
updateUserData
public void updateUserData(WizardStep step, QuickSetup qs)
Description copied from class:GuiApplicationCalled whenever this application should update its user data from values found in QuickSetup.- Specified by:
updateUserDatain classGuiApplication- Parameters:
step- current wizard stepqs- QuickSetup controller
-
setWizardDialogState
public void setWizardDialogState(QuickSetupDialog dlg, UserData userData, WizardStep step)
Description copied from class:GuiApplicationCalled when the user advances to new step in the wizard. Applications are expected to manipulate the QuickSetupDialog to reflect the current step.- Specified by:
setWizardDialogStatein classGuiApplication- Parameters:
dlg- QuickSetupDialog hosting the wizarduserData- UserData representing the data specified by the userstep- Step indicating the new current step
-
createUserData
public UserData createUserData(Launcher launcher) throws UserDataException, ApplicationException, ClientException
Description copied from interface:CliApplicationCreates a set of user data from command line arguments and installation status.- Specified by:
createUserDatain interfaceCliApplication- Parameters:
launcher- that launched this application- Returns:
- UserData object populated to reflect the input args and status
- Throws:
UserDataException- if something is wrong with the data provided by the userApplicationException- if there is an application specific problemClientException- If an error occurs when creating the data.
-
getInstallationPath
public String getInstallationPath()
Description copied from class:ApplicationReturns the installation path.- Specified by:
getInstallationPathin classApplication- Returns:
- the installation path.
-
getInstancePath
public String getInstancePath()
Description copied from class:ApplicationReturns the instance path.- Specified by:
getInstancePathin classApplication- Returns:
- the instance path.
-
getRunError
public ApplicationException getRunError()
Returns the ApplicationException that might occur during installation ornullif no exception occurred.- Specified by:
getRunErrorin interfaceCliApplication- Returns:
- the ApplicationException that might occur during installation or
nullif no exception occurred.
-
getReturnCode
public ReturnCode getReturnCode()
Description copied from interface:CliApplicationGets the return code to return to the console.- Specified by:
getReturnCodein interfaceCliApplication- Returns:
- return code to return; if null the return code indicated in the
error returned by
getRunErrorwill be used.
-
run
public void run()
Actually performs the uninstall in this thread. The thread is blocked.
-
getCurrentProgressStep
public UninstallProgressStep getCurrentProgressStep()
Description copied from class:ApplicationGets the current step.- Specified by:
getCurrentProgressStepin classApplication- Returns:
- ProgressStep representing the current step
-
getRatio
public Integer getRatio(ProgressStep step)
Returns an integer that specifies which percentage of the whole installation has been completed.- Specified by:
getRatioin classApplication- Parameters:
step- the UninstallProgressStep for which we want to get the ratio.- Returns:
- an integer that specifies which percentage of the whole uninstallation has been completed.
-
getSummary
public org.forgerock.i18n.LocalizableMessage getSummary(ProgressStep step)
Returns an formatted representation of the summary for the specified UninstallProgressStep.- Specified by:
getSummaryin classApplication- Parameters:
step- the UninstallProgressStep for which we want to get the summary.- Returns:
- an formatted representation of the summary for the specified UninstallProgressStep.
-
isFinished
public boolean isFinished()
Description copied from class:ApplicationReturns whether the installer has finished or not.- Specified by:
isFinishedin classApplication- Returns:
trueif the install is finished orfalseif not.
-
isCancellable
public boolean isCancellable()
Description copied from class:ApplicationIndicates whether this application is capable of cancelling the operation performed in the run method. A cancellable operation should leave its environment in the same state as it was prior to running the operation (files deleted, changes backed out etc.). Marking anApplicationas cancellable may control UI elements like the presense of a cancel button while the operation is being performed. Applications marked as cancellable should override thecancelmethod in such a way as to undo whatever actions have taken place in the run method up to that point.- Specified by:
isCancellablein classApplication- Returns:
- boolean where true inidcates that the operation is cancellable
-
cancel
public void cancel()
Description copied from class:ApplicationSignals that the application should cancel a currently running operation as soon as possible and return the environment to the state prior to running the operation. When finished backing out changes the application should make sure thatisFinishedreturns true so that the application can complete.- Specified by:
cancelin classApplication
-
windowClosing
public void windowClosing(QuickSetupDialog dlg, WindowEvent evt)
Description copied from class:GuiApplicationCalled by the controller when the window is closing. The application can take application specific actions here.- Specified by:
windowClosingin classGuiApplication- Parameters:
dlg- QuickSetupDialog that will be closingevt- The event from the Window indicating closing
-
getInitialFocusButtonName
public ButtonName getInitialFocusButtonName()
Description copied from class:GuiApplicationGet the name of the button that will receive initial focus.- Specified by:
getInitialFocusButtonNamein classGuiApplication- Returns:
- ButtonName of the button to receive initial focus
-
getWizardSteps
public Set<? extends WizardStep> getWizardSteps()
Description copied from class:GuiApplicationReturns the set of wizard steps used in this application's wizard.- Specified by:
getWizardStepsin classGuiApplication- Returns:
- Set of Step objects representing wizard steps
-
createWizardStepPanel
public QuickSetupStepPanel createWizardStepPanel(WizardStep step)
Description copied from class:GuiApplicationCreates a wizard panel given a specific step.- Specified by:
createWizardStepPanelin classGuiApplication- Parameters:
step- for which a panel representation should be created- Returns:
- QuickSetupStepPanel for representing the
step
-
getTrustManager
public ApplicationTrustManager getTrustManager()
Description copied from class:ApplicationReturns the trust manager that can be used to establish secure connections.- Overrides:
getTrustManagerin classApplication- Returns:
- the trust manager that can be used to establish secure connections.
-
-