Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.ui.dialogs
Class SystemPasswordPromptDialog


java.lang.Object
  extended by 

org.eclipse.jface.window.Window
      extended by 

org.eclipse.jface.dialogs.Dialog
          extended by 

org.eclipse.rse.ui.dialogs.SystemPromptDialog
              extended by 
org.eclipse.rse.ui.dialogs.SystemPasswordPromptDialog
All Implemented Interfaces:
Runnable, IDialogPage, IRunnableContext, IShellProvider, ISystemPasswordPromptDialog, ISystemPromptDialog, ISystemMessageLine, Listener

public final class SystemPasswordPromptDialog
extends SystemPromptDialog
implements ISystemPasswordPromptDialog

Prompt user for password. This class is final due to the sensitive nature of the information being prompted for.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window. Window
Window.IExceptionHandler
 
Field Summary
 
Fields inherited from class org.eclipse.rse.ui.dialogs. SystemPromptDialog
activeRunningOperations, ADD_BUTTON_NO, ADD_BUTTON_YES, ADD_ID, addButton, arrowCursor, BROWSE_BUTTON_NO, BROWSE_BUTTON_YES, BROWSE_ID, browseButton, buttonsComposite, CANCEL_ALL_ID, cancelAllButton, cancelAllPressed, cancelButton, cancelListener, DETAILS_BUTTON_NO, DETAILS_BUTTON_YES, DETAILS_ID, detailsButton, detailsButtonHideMode, detailsHideLabel, detailsShowLabel, dialogAreaComposite, dialogMnemonics, fMessageLine, helpId, horizontalSpacing, initialAddButtonEnabledState, initialDetailsButtonEnabledState, initialOKButtonEnabledState, inputObject, labelAdd, labelBrowse, labelCancel, labelCancelAll, labelDetailsHide, labelDetailsShow, labelOk, labelTest, marginHeight, marginWidth, minHeight, minWidth, needsProgressMonitor, noShowAgainButton, noShowAgainOption, okButton, okPressed, operationCancelableState, outputObject, outputObjectValidator, overallShell, pack, parentComposite, pendingErrorMessage, pendingMessage, prefId, prefStore, prefValAsSelected, progressMonitorPart, showAddButton, showBrowseButton, showCancelAllButton, showDetailsButton, showOkButton, showTestButton, TEST_BUTTON_NO, TEST_BUTTON_YES, TEST_ID, testButton, tipAdd, tipBrowse, tipCancel, tipCancelAll, tipDetailsHide, tipDetailsShow, tipOk, tipTest, title, titleImage, verticalSpacing, waitCursor, windowClosingDialog
 
Fields inherited from class org.eclipse.jface.dialogs. Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
 
Fields inherited from class org.eclipse.jface.window. Window
CANCEL, OK
 
Constructor Summary
SystemPasswordPromptDialog ( Shell shell, boolean requiresUserId, boolean requiresPassword)
          Constructor for SystemPasswordPromptDialog
 
Method Summary
protected   Control createInner ( Composite parent)
          Creates the dialog controls.
 boolean getForceToUpperCase ()
          Call this to query the force-to-uppercase setting
protected   Control getInitialFocusControl ()
          Return the Control to be given initial focus.
 boolean getIsSavePassword ()
          Return true if the user elected to save the password
 boolean getIsUserIdChanged ()
          Return true if the user changed the user id
 boolean getIsUserIdChangePermanent ()
          Return true if the user elected to make the changed user Id a permanent change.
  String getPassword ()
          Return the password entered by user
  String getUserId ()
          Return the userId entered by user
protected  boolean processOK ()
          Called when user presses OK button.
 void setForceToUpperCase (boolean force)
          Sets the option to force the userId and password to uppercase.
 void setPassword ( String password)
          Sets the password, may be null if no password is available.
 void setPasswordValidator ( ISystemValidator v)
          Sets the validator for the password.
 void setSavePassword (boolean save)
          Preselect the save password checkbox.
 void setSignonValidator ( ICredentialsValidator v)
          Sets the validator for the signon.
 void setSystemInput ( IConnectorService connectorService)
          Set the connector service from which the user is attempting to do a connect action.
 void setUserIdValidator ( ISystemValidator v)
          Sets the validator for the userId.
 
Methods inherited from class org.eclipse.rse.ui.dialogs. SystemPromptDialog
aboutToStart, addFillerLine, addGrowableFillerLine, addSeparatorLine, adjustButtonWidth, applyMnemonics, buttonPressed, clearErrorMessage, clearMessage, close, configureShell, createButtonBar, createButtonsForButtonBar, createContents, createControl, createDialogArea, createMessageLine, createNoShowAgainButton, createWizardClosingDialog, dispose, enableAddButton, enableBrowseButton, enableCancelAllButton, enableCancelButton, enableDetailsButton, enableOkButton, enableTestButton, getAddButton, getBrowseButton, getCancelAllButton, getCancelOrCloseButton, getControl, getDescription, getDetailsButton, getDialogMnemonics, getErrorMessage, getHelpContextId, getImage, getInputObject, getMessage, getMessageLine, getOkButton, getOutputObject, getOutputObjectValidator, getProgressMonitor, getSystemErrorMessage, getTestButton, getTitle, handleEvent, hardClose, okToClose, performHelp, processAdd, processBrowse, processCancel, processCancelAll, processDetails, processTest, publicConvertHeightInCharsToPixels, publicConvertWidthInCharsToPixels, restoreEnableState, restoreUIState, run, run, saveEnableStateAndSet, saveUIState, setAddButtonLabel, setAddButtonToolTipText, setBrowseButtonLabel, setBrowseButtonToolTipText, setBusyCursor, setCancelAllButtonLabel, setCancelAllButtonToolTipText, setCancelButtonLabel, setCancelButtonToolTipText, setControl, setDescription, setDetailsButtonLabel, setDetailsButtonToolTipText, setDisplayCursor, setDisplayCursor, setErrorMessage, setErrorMessage, setErrorMessage, setHelp, setHelp, setImageDescriptor, setInitialOKButtonEnabledState, setInputObject, setMessage, setMessage, setMinimumSize, setNeedsProgressMonitor, setNoShowAgainOption, setOkButtonLabel, setOkButtonToolTipText, setOutputObject, setOutputObjectValidator, setPageComplete, setShowAddButton, setShowBrowseButton, setShowCancelAllButton, setShowDetailsButton, setShowOkButton, setShowTestButton, setTestButtonLabel, setTestButtonToolTipText, setTitle, setVisible, wasCancelled, wasCancelledAll
 
Methods inherited from class org.eclipse.jface.dialogs. Dialog
applyDialogFont, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
 
Methods inherited from class org.eclipse.jface.window. Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.rse.ui.dialogs. ISystemPasswordPromptDialog
getShell, open, setBlockOnOpen, wasCancelled
 

Constructor Detail

SystemPasswordPromptDialog

public SystemPasswordPromptDialog(
Shell shell,
                                  boolean requiresUserId,
                                  boolean requiresPassword)
Constructor for SystemPasswordPromptDialog

Parameters:
shell - The shell in which to base this dialog.
requiresUserId - true if the userid field of the dialog must not be empty. Used only if there is no validator specified for setUserIdValidator(ISystemValidator).
requiresPassword - true if the password field of the dialog must not be empty. Used only if there is no password validator specified using setPasswordValidator(ISystemValidator).
Method Detail

setSystemInput

public void setSystemInput(
IConnectorService connectorService)
Set the connector service from which the user is attempting to do a connect action. This is used to query the system type, host name and user id to display to the user for contextual information.

This must be called prior to opening this dialog.

Specified by:
setSystemInput in interface ISystemPasswordPromptDialog
Parameters:
connectorService - the connector service associated with this dialog

setUserIdValidator

public void setUserIdValidator(
ISystemValidator v)
Sets the validator for the userId. If not null it will be called per keystroke.

This must be called prior to opening this dialog if something other than the default is needed.

Specified by:
setUserIdValidator in interface ISystemPasswordPromptDialog
Parameters:
v - a validator

setPasswordValidator

public void setPasswordValidator(
ISystemValidator v)
Sets the validator for the password. If not null it will be called per keystroke. The default validator is null.

This must be called prior to opening this dialog if something other than the default is needed.

Specified by:
setPasswordValidator in interface ISystemPasswordPromptDialog
Parameters:
v - a validator

setSignonValidator

public void setSignonValidator(
ICredentialsValidator v)
Sets the validator for the signon. The default validator is null. If not null the validator will be called when the user presses OK.

This must be called prior to opening this dialog if something other than the default is needed.

Specified by:
setSignonValidator in interface ISystemPasswordPromptDialog
Parameters:
v - a signon validator

setForceToUpperCase

public void setForceToUpperCase(boolean force)
Sets the option to force the userId and password to uppercase. This use should be rare. Use this with caution.

The default is false. This must be called prior to opening this dialog if something other than the default is needed.

Specified by:
setForceToUpperCase in interface ISystemPasswordPromptDialog
Parameters:
force - true if the user id and password are to be forced to uppercase

getForceToUpperCase

public boolean getForceToUpperCase()
Call this to query the force-to-uppercase setting

Specified by:
getForceToUpperCase in interface ISystemPasswordPromptDialog
Returns:
the setting for forcing the user id and password to upper case

createInner

protected 
Control createInner(
Composite parent)
Creates the dialog controls.

Specified by:
createInner in class SystemPromptDialog
Parameters:
parent - the containing composite control in which our controls will be created. It is assumed to have a grid layout.
Returns:
the composite control we create that nests inside the parent
See Also:
SystemPromptDialog.createInner(Composite)

getInitialFocusControl

protected 
Control getInitialFocusControl()
Description copied from class: SystemPromptDialog
Return the Control to be given initial focus. Child classes must override this, but can return null.

Specified by:
getInitialFocusControl in class SystemPromptDialog
See Also:
SystemPromptDialog.getInitialFocusControl()

getUserId

public 
String getUserId()
Description copied from interface: ISystemPasswordPromptDialog
Return the userId entered by user

Specified by:
getUserId in interface ISystemPasswordPromptDialog
Returns:
the userId entered by user

getPassword

public 
String getPassword()
Description copied from interface: ISystemPasswordPromptDialog
Return the password entered by user

Specified by:
getPassword in interface ISystemPasswordPromptDialog
Returns:
the password may have been modified by the user.

setPassword

public void setPassword(
String password)
Sets the password, may be null if no password is available.

Specified by:
setPassword in interface ISystemPasswordPromptDialog
Parameters:
password - the password to provide for the password field.

getIsUserIdChanged

public boolean getIsUserIdChanged()
Description copied from interface: ISystemPasswordPromptDialog
Return true if the user changed the user id

Specified by:
getIsUserIdChanged in interface ISystemPasswordPromptDialog
Returns:
true if the user changed the user id

getIsUserIdChangePermanent

public boolean getIsUserIdChangePermanent()
Description copied from interface: ISystemPasswordPromptDialog
Return true if the user elected to make the changed user Id a permanent change.

Specified by:
getIsUserIdChangePermanent in interface ISystemPasswordPromptDialog
Returns:
true if the user elected to make the changed user Id a permanent change.

getIsSavePassword

public boolean getIsSavePassword()
Description copied from interface: ISystemPasswordPromptDialog
Return true if the user elected to save the password

Specified by:
getIsSavePassword in interface ISystemPasswordPromptDialog
Returns:
true if the user elected to make the changed user Id a permanent change.

setSavePassword

public void setSavePassword(boolean save)
Preselect the save password checkbox. Default value is to not select the save password checkbox.

Specified by:
setSavePassword in interface ISystemPasswordPromptDialog
Parameters:
save - true if the save password box should be checked.

processOK

protected boolean processOK()
Called when user presses OK button.

Overrides:
processOK in class SystemPromptDialog
Returns:
true to close dialog, false to not close dialog.

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire