public class Installer extends GuiApplication
Application.ErrorPrintStream, Application.OutputPrintStream, Application.PointAdder| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_PORT_VALUE
The maximum integer value that can be used for a port.
|
static int |
MIN_PORT_VALUE
The minimum integer value that can be used for a port.
|
static String |
ROOT_BACKEND_NAME
The name of the backend created on setup.
|
static int |
THRESHOLD_CLOCK_DIFFERENCE_WARNING
The threshold in minutes used to know whether we must display a warning
informing that there is a server clock difference between two servers whose
contents are being replicated.
|
formatter, installStatus, tempLogFile| Constructor and Description |
|---|
Installer()
Creates a default instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
applicationPrintStreamReceived(String message)
Method that is invoked by the printstreams with the messages received
on operations such as start or import.
|
void |
cancel()
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.
|
boolean |
canFinish(WizardStep step)
Indicates whether the user is allowed to finish the wizard from
step. |
boolean |
canGoBack(WizardStep step)
Indicates whether the user is allowed to return to a previous
step from
step. |
boolean |
canGoForward(WizardStep step)
Indicates whether the user is allowed to move to a new
step from
step. |
void |
checkAbort()
Checks the value of
canceled field and throws an
ApplicationException if true. |
void |
closeClicked(WizardStep cStep,
QuickSetup qs)
Called when the user has clicked the 'close' button.
|
JPanel |
createFramePanel(QuickSetupDialog dlg)
Creates the main panel for the wizard dialog.
|
UserData |
createUserData()
Creates a set of user data with default values.
|
QuickSetupStepPanel |
createWizardStepPanel(WizardStep step)
Creates a wizard panel given a specific step.
|
boolean |
finishClicked(WizardStep cStep,
QuickSetup qs)
Called when the user has clicked the 'finish' button.
|
void |
forceToDisplay()
This method is called when we detected that there is something installed
we inform of this to the user and the user wants to proceed with the
installation destroying the contents of the data and the configuration
in the current installation.
|
ApplicationException |
getApplicationException()
Returns the exception from the run() method, if any.
|
org.forgerock.i18n.LocalizableMessage |
getCloseButtonToolTip()
Gets the key for the close button's tool tip text.
|
ProgressStep |
getCurrentProgressStep()
Gets the current step.
|
int |
getExtraDialogHeight()
Gets the amount of addition pixels added to the height
of the tallest panel in order to size the wizard for
asthetic reasons.
|
org.forgerock.i18n.LocalizableMessage |
getFinishButtonToolTip()
Gets the key for the finish button's tool tip text.
|
WizardStep |
getFinishedStep()
Gets the finished step in the wizard.
|
WizardStep |
getFirstWizardStep()
Returns the initial wizard step.
|
org.forgerock.i18n.LocalizableMessage |
getFrameTitle()
Gets the frame title of the GUI application that will be used
in some operating systems.
|
ButtonName |
getInitialFocusButtonName()
Get the name of the button that will receive initial focus.
|
String |
getInstallationPath()
Returns the installation path.
|
String |
getInstancePath()
Returns the instance path.
|
WizardStep |
getNextWizardStep(WizardStep step)
Gets the next step in the wizard given a current step.
|
LinkedHashSet<WizardStep> |
getOrderedSteps()
Returns the list of all the steps in an ordered manner.
|
WizardStep |
getPreviousWizardStep(WizardStep step)
Gets the previous step in the wizard given a current step.
|
org.forgerock.i18n.LocalizableMessage |
getQuitButtonToolTip()
Gets the key for the quit button's tool tip text.
|
Integer |
getRatio(ProgressStep status)
Gets an integer representing the amount of processing
this application still needs to perform as a ratio
out of 100.
|
org.forgerock.i18n.LocalizableMessage |
getSummary(ProgressStep status)
Gets an i18n'd string representing the summary of
a give ProgressStep.
|
Set<? extends WizardStep> |
getWizardSteps()
Returns the set of wizard steps used in this application's wizard.
|
void |
initializeSuffix(ConnectionWrapper conn,
int replicaServerId,
org.forgerock.opendj.ldap.DN suffixDn,
boolean displayProgress,
HostPort sourceServerDisplay)
Initializes a suffix with the contents of a replica that has a given
replication id.
|
boolean |
isCancellable()
Indicates whether this application is capable of cancelling
the operation performed in the run method.
|
boolean |
isFinished()
Returns whether the installer has finished or not.
|
boolean |
isSubStep(WizardStep step)
Indicates whether the provided
step is a sub step or not. |
boolean |
isVisible(WizardStep step,
QuickSetup qs)
Indicates whether the provided
step is visible or not
depending on the contents of the QuickSetup object that is provided. |
boolean |
isVisible(WizardStep step,
UserData userData)
Indicates whether the provided
step is visible or not
depending on the contents of the UserData object that is provided. |
void |
nextClicked(WizardStep cStep,
QuickSetup qs)
Called when the user has clicked the 'next' button.
|
void |
previousClicked(WizardStep cStep,
QuickSetup qs)
Called when the user has clicked the 'previous' button.
|
void |
quitClicked(WizardStep cStep,
QuickSetup qs)
Called when the user has clicked the 'quit' button.
|
void |
run()
Actually performs the install in this thread.
|
void |
setWizardDialogState(QuickSetupDialog dlg,
UserData userData,
WizardStep step)
Called when the user advances to new step in the wizard.
|
void |
updateUserData(WizardStep cStep,
QuickSetup qs)
These methods validate the data provided by the user in the panels and
update the userData object according to that content.
|
void |
windowClosing(QuickSetupDialog dlg,
WindowEvent evt)
Called by the controller when the window is closing.
|
acceptCertificateForException, confirmCancel, finishOnLeft, getCurrentWizardStep, getFinishButtonLabel, getTab, getUserArguments, setDisplayedWizardStep, setQuickSetupDialog, setUserArgumentsaddProgressUpdateListener, create, getApplicationErrorStream, getApplicationOutputStream, getFormattedDone, getFormattedDoneWithLineBreak, getFormattedError, getFormattedError, getFormattedLog, getFormattedLogError, getFormattedProgress, getFormattedProgressWithLineBreak, getFormattedSuccess, getFormattedSummary, getFormattedWarning, getFormattedWithPoints, getInstallation, getLineBreak, getMessage, getProgressMessageFormatter, getRemoteConnection, getTaskSeparator, getTrustManager, getUserData, isVerbose, notifyListeners, notifyListeners, notifyListenersDone, notifyListenersRatioChange, notifyListenersWithPoints, removeProgressUpdateListener, setCurrentInstallStatus, setInstallation, setNotifyListeners, setProgressMessageFormatter, setTempLogFile, setUserDatapublic static final int MIN_PORT_VALUE
public static final int MAX_PORT_VALUE
public static final String ROOT_BACKEND_NAME
public static final int THRESHOLD_CLOCK_DIFFERENCE_WARNING
public void run()
public Integer getRatio(ProgressStep status)
ApplicationgetRatio in class Applicationstatus - ProgressStop for which a summary is neededpublic org.forgerock.i18n.LocalizableMessage getSummary(ProgressStep status)
ApplicationgetSummary in class Applicationstatus - ProgressStop for which a summary is neededpublic ApplicationException getApplicationException()
public String getInstallationPath()
ApplicationgetInstallationPath in class Applicationpublic String getInstancePath()
ApplicationgetInstancePath in class Applicationpublic boolean isCancellable()
ApplicationApplication as cancellable may control UI
elements like the presense of a cancel button while the operation
is being performed.
Applications marked as cancellable should override the
cancel method in such a way as to undo whatever
actions have taken place in the run method up to that point.isCancellable in class Applicationpublic UserData createUserData()
ApplicationcreateUserData in class Applicationpublic void forceToDisplay()
GuiApplicationforceToDisplay in class GuiApplicationpublic boolean canGoBack(WizardStep step)
GuiApplicationstep.canGoBack in class GuiApplicationstep - WizardStep for which the the return value indicates whether
or not the user can return to a previous stepsteppublic boolean canGoForward(WizardStep step)
GuiApplicationstep.canGoForward in class GuiApplicationstep - WizardStep for which the the return value indicates whether
or not the user can move to a new stepsteppublic boolean canFinish(WizardStep step)
GuiApplicationstep.canFinish in class GuiApplicationstep - WizardStep for which the the return value indicates whether
or not the user can finish the wizardpublic boolean isSubStep(WizardStep step)
GuiApplicationstep is a sub step or not.isSubStep in class GuiApplicationstep - WizardStep for which the return value indicates whether
or not is a sub step.step is a
substep.public boolean isVisible(WizardStep step, UserData userData)
GuiApplicationstep is visible or not
depending on the contents of the UserData object that is provided.isVisible in class GuiApplicationstep - WizardStep for which the return value indicates whether
or not is visible.userData - the UserData to be used to determine if the step is
visible or not.step is
visible.public boolean isVisible(WizardStep step, QuickSetup qs)
GuiApplicationstep is visible or not
depending on the contents of the QuickSetup object that is provided.isVisible in class GuiApplicationstep - WizardStep for which the return value indicates whether
or not is visible.qs - the QuickSetup to be used to determine if the step is
visible or not.step is
visible.public boolean finishClicked(WizardStep cStep, QuickSetup qs)
GuiApplicationfinishClicked in class GuiApplicationcStep - WizardStep at which the user clicked the previous buttonqs - QuickSetup controllerpublic void nextClicked(WizardStep cStep, QuickSetup qs)
GuiApplicationnextClicked in class GuiApplicationcStep - WizardStep at which the user clicked the next buttonqs - QuickSetup controllerpublic void closeClicked(WizardStep cStep, QuickSetup qs)
GuiApplicationcloseClicked in class GuiApplicationcStep - WizardStep at which the user clicked the close buttonqs - QuickSetup controllerpublic boolean isFinished()
ApplicationisFinished in class Applicationtrue if the install is finished or false
if not.public void cancel()
ApplicationisFinished
returns true so that the application can complete.cancel in class Applicationpublic void quitClicked(WizardStep cStep, QuickSetup qs)
GuiApplicationquitClicked in class GuiApplicationcStep - WizardStep at which the user clicked the quit buttonqs - QuickSetup controllerpublic ButtonName getInitialFocusButtonName()
GuiApplicationgetInitialFocusButtonName in class GuiApplicationpublic JPanel createFramePanel(QuickSetupDialog dlg)
GuiApplicationcreateFramePanel in class GuiApplicationdlg - QuickSetupDialog usedpublic Set<? extends WizardStep> getWizardSteps()
GuiApplicationgetWizardSteps in class GuiApplicationpublic QuickSetupStepPanel createWizardStepPanel(WizardStep step)
GuiApplicationcreateWizardStepPanel in class GuiApplicationstep - for which a panel representation should be createdsteppublic void windowClosing(QuickSetupDialog dlg, WindowEvent evt)
GuiApplicationwindowClosing in class GuiApplicationdlg - QuickSetupDialog that will be closingevt - The event from the Window indicating closingpublic org.forgerock.i18n.LocalizableMessage getCloseButtonToolTip()
GuiApplicationgetCloseButtonToolTip in class GuiApplicationpublic org.forgerock.i18n.LocalizableMessage getQuitButtonToolTip()
GuiApplicationgetQuitButtonToolTip in class GuiApplicationpublic org.forgerock.i18n.LocalizableMessage getFinishButtonToolTip()
GuiApplicationgetFinishButtonToolTip in class GuiApplicationpublic int getExtraDialogHeight()
GuiApplicationgetExtraDialogHeight in class GuiApplicationpublic void previousClicked(WizardStep cStep, QuickSetup qs)
GuiApplicationpreviousClicked in class GuiApplicationcStep - WizardStep at which the user clicked the previous buttonqs - QuickSetup controllerpublic org.forgerock.i18n.LocalizableMessage getFrameTitle()
GuiApplicationgetFrameTitle in class GuiApplicationpublic void setWizardDialogState(QuickSetupDialog dlg, UserData userData, WizardStep step)
GuiApplicationsetWizardDialogState in class GuiApplicationdlg - QuickSetupDialog hosting the wizarduserData - UserData representing the data specified by the userstep - Step indicating the new current steppublic ProgressStep getCurrentProgressStep()
ApplicationgetCurrentProgressStep in class Applicationpublic WizardStep getFirstWizardStep()
GuiApplicationgetFirstWizardStep in class GuiApplicationpublic WizardStep getNextWizardStep(WizardStep step)
GuiApplicationgetNextWizardStep in class GuiApplicationstep - Step the current steppublic LinkedHashSet<WizardStep> getOrderedSteps()
GuiApplicationgetOrderedSteps in class GuiApplicationpublic WizardStep getPreviousWizardStep(WizardStep step)
GuiApplicationgetPreviousWizardStep in class GuiApplicationstep - Step the current steppublic WizardStep getFinishedStep()
GuiApplicationgetFinishedStep in class GuiApplicationpublic void checkAbort()
throws ApplicationException
canceled field and throws an
ApplicationException if true. This indicates that the user has canceled
this operation and the process of aborting should begin as soon as
possible.checkAbort in class ApplicationApplicationException - thrown if canceledpublic void updateUserData(WizardStep cStep, QuickSetup qs) throws UserDataException
updateUserData in class GuiApplicationcStep - the current step of the wizardqs - QuickStart controllerUserDataException - if the data provided by the user is not valid.public void initializeSuffix(ConnectionWrapper conn, int replicaServerId, org.forgerock.opendj.ldap.DN suffixDn, boolean displayProgress, HostPort sourceServerDisplay) throws ApplicationException, PeerNotFoundException
conn - the connection to the server whose suffix we want to initialize.replicaServerId - the server ID of the replica we want to use to initialize the
contents of the suffix.suffixDn - the dn of the suffix.displayProgress - whether we want to display progress or not.sourceServerDisplay - the string to be used to represent the server that contains the
data that will be used to initialize the suffix.ApplicationException - if an unexpected error occurs.PeerNotFoundException - if the replication mechanism cannot find a peer.protected void applicationPrintStreamReceived(String message)
ApplicationapplicationPrintStreamReceived in class Applicationmessage - the message that has been receivedCopyright © 2010-2020 Wren Security. All Rights Reserved.