|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.jsdt.checkpoints.StartupCheckpoint
public abstract class StartupCheckpoint
This is the abstract base class that implements the default behavior for all startup checkpoint classes. Each startup checkpoint must extend this base class and implement the execute() method. The startup checkpoint class is executed immediately before the deployment wizard user interface is displayed.
Each startup checkpoint subclass can override methods to modify attributes of the progress dialog. This dialog is displayed while the startup checkpoint class is running. The attributes that can be modified include the title, message, message details, percent complete, and whether or not the cancel button is enabled. If you want to override defaults on the progress dialog, you must override initializeProgressDialog(). The deployment wizard will invoke initializeProgressDialog() prior to invoking your execute() method to ensure the initial progress dialog is populated with the desired values.
The execute method exits with a return code that indicates how the deployment wizard should continue. Based on this return code, the deployment wizard continues to launch, displays a dialog to cancel the launch, or prompts the user to cancel or continue. The subclass can override the title and message text of these dialogs.
Field Summary | |
---|---|
static int |
ABORT_DEPLOYER
Return code that indicates the deployment wizard should not be launched. |
static java.lang.String |
ABORT_DIALOG_MESSAGE
The default cancel dialog message that is displayed if the startup checkpoint exits with a return code of ABORT_DEPLOYER. |
static java.lang.String |
ABORT_DIALOG_TITLE
The default cancel dialog title that is displayed if the startup checkpoint exits with a return code of ABORT_DEPLOYER. |
static java.lang.String |
AUTOMATIC
The default progress mode. |
static int |
DEFAULT_EXECUTION_TIME
Default execution time for a startup checkpoint class. |
static int |
LAUNCH_DEPLOYER
Return code that indicates the deployment wizard should be launched. |
static java.lang.String |
MANUAL
The progress mode that indicates that the startup checkpoint class handles progress updates while running the startup checkpoint class. |
static java.lang.String |
PROGRESS_DIALOG_MESSAGE
The default message on the progress dialog that displays while the startup checkpoint class runs. |
static java.lang.String |
PROGRESS_DIALOG_TITLE
The default title of the progress dialog that displays while the startup checkpoint class runs. |
static int |
PROMPT_USER
Return code that indicates the deployment wizard should prompt the user continue or cancel the launch. |
static int |
RC_NOT_PROVIDED_YET
FOR INTERNAL USE ONLY. |
static int |
TIMEOUT_FACTOR
FOR INTERNAL USE ONLY. |
static java.lang.String |
USER_PROMPT_DIALOG_MESSAGE
The default dialog message that is displayed if the startup checkpoint exits with a return code of PROMPT_USER. |
static java.lang.String |
USER_PROMPT_DIALOG_TITLE
The default dialog title that is displayed if the startup checkpoint exits with a return code of PROMPT_USER. |
Constructor Summary | |
---|---|
StartupCheckpoint()
|
Method Summary | |
---|---|
void |
enableCancelOnProgressDialog(boolean enableCancel)
Set enableCancel to false if you do not want the cancel button to be enabled on the progress dialog while the startup checkpoint class is running. |
abstract int |
execute(boolean silentMode)
Each startup checkpoint subclass must implement this method. |
java.lang.String |
getAbortDialogMessage()
Returns the message displayed on the cancel dialog. |
java.lang.String |
getAbortDialogTitle()
Returns the title displayed on the cancel dialog. |
int |
getExecutionTime()
Returns the time in minutes that it takes the startup checkpoint class to run. |
int |
getPercentComplete()
Returns the percent complete displayed on the progress dialog. |
java.lang.String |
getProgressDialogDetails()
Returns the detail text displayed directly above the progress bar on the progress dialog. |
java.lang.String |
getProgressDialogMessage()
Returns the message text displayed on the progress dialog while your startup checkpoint is running. |
java.lang.String |
getProgressDialogTitle()
Returns the title displayed on the progress dialog that appears while the startup checkpoint is running. |
java.lang.String |
getProgressMode()
Returns the mode indicating how progress updates are controlled while the startup checkpoint class runs. |
java.lang.String |
getPromptUserDialogMessage()
Returns the message text displayed on the dialog that prompts the user for a response about how the deployment wizard should proceed. |
java.lang.String |
getUserPromptDialogTitle()
Returns the title of the dialog that prompts the user for a response, which indicates how the deployment wizard should proceed. |
void |
initializeProgressDialog()
Initializes the progress dialog with the desired values. |
boolean |
isCancelEnabledOnProgressDialog()
Returns a boolean indicating whether the cancel button is enabled on the progress dialog. |
void |
logMessage(java.lang.String message)
Log a message to the deployment wizard master log file. |
void |
setAbortDialogMessage(java.lang.String abortDialogMessage)
Set the message of the dialog that appears when the deployment wizard should not launch the deployment wizard using the solution associated with this startup checkpoint. |
void |
setAbortDialogTitle(java.lang.String abortDialogTitle)
Set the title of the dialog that appears when the deployment wizard should not launch the deployment wizard using the solution associated with this startup checkpoint. |
void |
setExecutionTime(int executionTime)
Set the estimated time it takes for your startup checkpoint class to run. |
void |
setPercentComplete(int percentComplete)
Set the percent complete displayed on the progress bar of the progress dialog. |
void |
setProgressDialogDetails(java.lang.String progressDialogDetails)
Set the detailed text for the progress dialog that appears while your startup checkpoint is running. |
void |
setProgressDialogMessage(java.lang.String progressDialogMessage)
Set the message text for the progress dialog that appears while your startup checkpoint is running. |
void |
setProgressDialogTitle(java.lang.String progressDialogTitle)
Set the title for the progress dialog that appears while the startup checkpoint is running. |
void |
setProgressMode(java.lang.String progressMode)
Indicate how displaying progress to the user is controlled while the startup checkpoint runs. |
void |
setShowProgressDialog(boolean show)
Sets an indicator as to whether or not the progress dialog will display when the when the startup checkpoint runs. |
void |
setUserPromptDialogMessage(java.lang.String userPromptDialogMessage)
Set the message of the dialog that appears when the deployment wizard prompts the user to continue and launch this solution or to cancel the launch. |
void |
setUserPromptDialogTitle(java.lang.String userPromptDialogTitle)
Set the title of the dialog that appears when the deployment wizard prompts the user to continue and launch this solution or to cancel the launch. |
boolean |
shouldShowProgressDialog()
Indicates whether or not the progress dialog will display when the startup checkpoint runs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LAUNCH_DEPLOYER
public static final int PROMPT_USER
public static final int ABORT_DEPLOYER
public static final int RC_NOT_PROVIDED_YET
public static final int DEFAULT_EXECUTION_TIME
public static final int TIMEOUT_FACTOR
public static final java.lang.String AUTOMATIC
public static final java.lang.String MANUAL
public static final java.lang.String ABORT_DIALOG_TITLE
public static final java.lang.String ABORT_DIALOG_MESSAGE
public static final java.lang.String USER_PROMPT_DIALOG_TITLE
public static final java.lang.String USER_PROMPT_DIALOG_MESSAGE
public static final java.lang.String PROGRESS_DIALOG_TITLE
public static final java.lang.String PROGRESS_DIALOG_MESSAGE
Constructor Detail |
---|
public StartupCheckpoint()
Method Detail |
---|
public abstract int execute(boolean silentMode)
The deployment wizard invokes this class as the entry point into your startup checkpoint class. This runs immediately before the deployment wizard interface is displayed. In order to override the defaults for the progress dialog, override the initializeProgressDialog method.
silentMode
- -
Indicates whether this startup checkpoint is being
run in silent mode or interactively. If silentMode is
true, do not surface any graphical interfaces.
public void initializeProgressDialog()
public java.lang.String getAbortDialogMessage()
public void setAbortDialogMessage(java.lang.String abortDialogMessage)
abortDialogMessage
- The abortDialogMessage to set. If this value is null or the
empty string, a default message is used. To avoid truncation,
the text should not exceed the width of 265 English characters.public java.lang.String getAbortDialogTitle()
public void setAbortDialogTitle(java.lang.String abortDialogTitle)
abortDialogTitle
- The abortDialogTitle to set. If this value is null or the
empty string, a default title is used. To avoid truncation,
the text should not exceed the width of 50 English characters.public int getPercentComplete()
public void setPercentComplete(int percentComplete)
percentComplete
- The percentComplete to set.public java.lang.String getProgressDialogDetails()
public void setProgressDialogDetails(java.lang.String progressDialogDetails)
progressDialogDetails
- The progressDialogDetails to set. To avoid truncation,
the text should not exceed the width of 80 English characters.public java.lang.String getProgressDialogMessage()
public void setProgressDialogMessage(java.lang.String progressDialogMessage)
progressDialogMessage
- The progressDialogMessage to set. If this value is null or the
empty string, a default message is used. To avoid truncation,
the text should not exceed the width of 200 English characters.public java.lang.String getProgressDialogTitle()
public void setProgressDialogTitle(java.lang.String progressDialogTitle)
progressDialogTitle
- The progressDialogTitle to set. If this value is null or the
empty string, a default title is used. To avoid truncation,
the text should not exceed the width of 50 English characters.public java.lang.String getProgressMode()
public void setProgressMode(java.lang.String progressMode)
To have more control over the progress dialog, set the progress mode to StartupCheckpoint.MANUAL. If the progress mode is manual, override the executionTime, progress dialog title, message, details, and percent complete.
progressMode
- The progressMode to set. Value must be StartupCheckpoint.AUTOMATIC or
StartupCheckpoint.MANUAL. Any other values are interpreted as StartupCheckpoint.AUTOMATIC.public java.lang.String getPromptUserDialogMessage()
public void setUserPromptDialogMessage(java.lang.String userPromptDialogMessage)
userPromptDialogMessage
- The UserPromptDialogMessage to set. If this value is null or
the empty string, a default message is used. To avoid truncation,
the text should not exceed the width of 265 English characters.public java.lang.String getUserPromptDialogTitle()
public void setUserPromptDialogTitle(java.lang.String userPromptDialogTitle)
userPromptDialogTitle
- The userPromptDialogTitle to set. If this value is null or the
empty string, a default title is used. To avoid truncation,
the text should not exceed the width of 50 English characters.public boolean isCancelEnabledOnProgressDialog()
public void enableCancelOnProgressDialog(boolean enableCancel)
Note: By default, enableCancel is set to true on the progress dialog.
enableCancel
- The enableCancel to set.public int getExecutionTime()
public void setExecutionTime(int executionTime)
NOTE: The execution time must be specified in minutes. The default is 2 minutes.
exeuctionTime
- The exeuctionTime to set.public void logMessage(java.lang.String message)
message
- The message text to log. This text passed in should
already be resolved for the appropriate locale.public void setShowProgressDialog(boolean show)
If the deployment wizard is not running, the progress dialog will not display regardless of this setting.
show
- public boolean shouldShowProgressDialog()
If the deployment wizard is not running, the progress dialog will not display regardless of this setting.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |