public abstract class AbstractChangePasswordDialog extends JDialog implements IChangePasswordDialog
JDialog.AccessibleJDialogDialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeWindow.AccessibleAWTWindow, Window.TypeContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected Button |
acceptButton
Button for "acceptButton". |
protected Application |
application
Application for obtain the parent frame. |
protected ResourceBundle |
bundle
ResourceBundle of application. |
static String |
CHANGE_PASSWORD_DIALOG_BUTTON
|
static String |
CHANGE_PASSWORD_DIALOG_CURRENT_PASSWORD
String to set PasswordDataField "currentPassword"
configuration in the defaultXMLConfigurationParameters. |
static String |
CHANGE_PASSWORD_DIALOG_NEW_PASSWORD
String to set PasswordDataField "newPassword"
configuration in the defaultXMLConfigurationParameters. |
static String |
CHANGE_PASSWORD_DIALOG_REPEAT_NEW_PASSWORD
String to set PasswordDataField "repeatNewPassword"
configuration in the defaultXMLConfigurationParameters. |
protected PasswordDataField |
currentPassword
PasswordDataField for "currentPassword". |
protected EntityReferenceLocator |
locator
EntityReferenceLocator used to call the method
UtilReferenceLocator.changePassword(String, int, Hashtable, Hashtable)
to modify the current password of the user who try to login and its
period of validity has expired (Difference bettwen lastUpdatedDate and
actuale date is greater than period). |
protected PasswordDataField |
newPassword
PasswordDataField for "newPassword". |
protected String |
oldPassword
String of the old password of actual user. |
protected Hashtable |
params
Hashtable with the configuration of main application. |
protected PasswordDataField |
repeatNewPassword
PasswordDataField for "repeatNewPassword". |
protected JLabel |
securityLabel
JLabel to show messages about the status. |
protected String |
user
String with the actual user which password validity has expired. |
accessibleContext, rootPane, rootPaneCheckingEnabledDEFAULT_MODALITY_TYPEBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTCHANGE_PASSWORD_DIALOG_CLASS, CHANGE_PASSWORD_ICON, CHANGE_PASSWORD_TEXT, ENCRYPT, LOGIN_ICON, PASSWORD_LEVEL, SECURITY_BUTTON, SECURITY_LABEL, SECURITY_PASSWORD_PARAMETERS, WINDOW_TITLEDEBUG_LANGUAGEDISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSEABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
AbstractChangePasswordDialog(Application mainApplication,
Hashtable parameters,
EntityReferenceLocator locator,
String user,
String password)
Contructor for this abstract class.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addTextToTranslate(Internationalization component,
Vector texts)
Add the
component to the Vector of texts to translate |
protected Button |
createAcceptButton(Hashtable parameters)
Return a
Button for the AbstractChangePasswordDialog
window. |
protected PasswordDataField |
createCurrentPassword(Hashtable parameters)
Returns the
PasswordDataField which references to the
"currentPassword". |
protected ImageIcon |
createImage(Hashtable parameters)
Return an
ImageIcon for the AbstractChangePasswordDialog
window. |
protected PasswordDataField |
createPassword(Hashtable parameters)
Returns the
PasswordDataField which references to the
"newPassword". |
protected PasswordDataField |
createRepeatPassword(Hashtable parameters)
Returns the
PasswordDataField which references to the
"repeatNewPassword". |
protected JLabel |
createSecurityLabel(Hashtable parameters)
Return a
JLabel, where it shows messages about the password
update. |
Application |
getApplication()
Returns the application core.
|
EntityReferenceLocator |
getEntityReferenceLocator()
Returns the entity reference locator.
|
String |
getPasswordValue()
Return the
String of the new password
Conditions to return the new password String:
newPassword is not null
repeatNewPassword is not null
newPassword and repeatNewPassword are equals
|
Vector |
getTextsToTranslate()
Returns all the texts in the element suitable for being translated.
|
EntityResult |
setPassword(String password)
Set to the
user, who expires its password valid time, a new one. |
void |
setResourceBundle(ResourceBundle resourceBundle)
Sets the language resource bundle.
|
void |
showChangePassword()
Center the change password dialog in the screen and change its visibility
to true.
|
void |
showChangePasswordInParentLocation(Window w)
Center the change password dialog in the center of the window passed by
parameter and change its visibility to true.
|
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateaddNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBackaddPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFrontadd, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetComponentLocalepublic static final String CHANGE_PASSWORD_DIALOG_CURRENT_PASSWORD
String to set PasswordDataField "currentPassword"
configuration in the defaultXMLConfigurationParameters.public static final String CHANGE_PASSWORD_DIALOG_NEW_PASSWORD
String to set PasswordDataField "newPassword"
configuration in the defaultXMLConfigurationParameters.public static final String CHANGE_PASSWORD_DIALOG_REPEAT_NEW_PASSWORD
String to set PasswordDataField "repeatNewPassword"
configuration in the defaultXMLConfigurationParameters.public static final String CHANGE_PASSWORD_DIALOG_BUTTON
protected ResourceBundle bundle
ResourceBundle of application.protected PasswordDataField newPassword
PasswordDataField for "newPassword".protected PasswordDataField currentPassword
PasswordDataField for "currentPassword".protected PasswordDataField repeatNewPassword
PasswordDataField for "repeatNewPassword".protected EntityReferenceLocator locator
EntityReferenceLocator used to call the method
UtilReferenceLocator.changePassword(String, int, Hashtable, Hashtable)
to modify the current password of the user who try to login and its
period of validity has expired (Difference bettwen lastUpdatedDate and
actuale date is greater than period).protected Application application
Application for obtain the parent frame.public AbstractChangePasswordDialog(Application mainApplication, Hashtable parameters, EntityReferenceLocator locator, String user, String password)
mainApplication - The actual application.parameters - The configuration of application in the clientapplication.xml.locator - The entity reference locator.public Application getApplication()
getApplication in interface IChangePasswordDialogpublic EntityReferenceLocator getEntityReferenceLocator()
getEntityReferenceLocator in interface IChangePasswordDialogprotected PasswordDataField createCurrentPassword(Hashtable parameters)
PasswordDataField which references to the
"currentPassword".
This method check the defaultXMLParameters parameters for the tag
<Class name="ChangePasswordDialog.CurrentPassword"> and create
the PasswordDataField with them. This PasswordDataField
has as attr="currentPassword".
parameters - The Hashtable with the configuration parameters of the
application. Does nothing, it is only for extension purposes,
e.g., the "encrypt" attribute in the configuration
parameters of the application.PasswordDataField which references to the
"currentPassword".protected PasswordDataField createPassword(Hashtable parameters)
PasswordDataField which references to the
"newPassword".
This method check the defaultXMLParameters parameters for the tag
<Class name="ChangePasswordDialog.NewPassword"> and create the
PasswordDataField with them. This PasswordDataField has
as attr="newPassword".
parameters - The Hashtable with the configuration parameters of the
application. Does nothing, it is only for extension purposes,
e.g., the "encrypt" attribute in the configuration
parameters of the application. It's recommended to check if in
the xml parameters of application exists parameters in:
DefaultXMLParametersManager.getParameters(IChangePasswordDialog.SECURITY_PASSWORD_PARAMETERS);, and add it to the hashtable.PasswordDataField which references to the
"newPassword".protected PasswordDataField createRepeatPassword(Hashtable parameters)
PasswordDataField which references to the
"repeatNewPassword".
This method check the defaultXMLParameters parameters for the tag
<Class name="ChangePasswordDialog.RepeatNewPassword"> and create
the PasswordDataField with them. This PasswordDataField
has as attr="repeatNewPassword".
parameters - The Hashtable with the configuration parameters of the
application. Does nothing, it is only for extension purposes,
e.g., the "encrypt" attribute in the configuration
parameters of the application.PasswordDataField which references to the
"repeatNewPassword".protected ImageIcon createImage(Hashtable parameters)
ImageIcon for the AbstractChangePasswordDialog
window.
The path to the ImageIcon can be configured in the parameters of
the application in the "clientapplication.xml" file. First,
checks if exists in the parameters a value with the
key="changepasswordicon". If not, check if exists a value in
parameters with the key="loginicon" (used for the login dialog).
If not exists any of this values, returns the Ontimize Back Login
ImageIcon.
protected Button createAcceptButton(Hashtable parameters)
Button for the AbstractChangePasswordDialog
window.
This method check the defaultXMLParameters parameters for the tag
<Class name="ChangePasswordDialog.Button"> and create the
Button with them. This Button has as
attr="application.accept" text="application.accept".
protected JLabel createSecurityLabel(Hashtable parameters)
JLabel, where it shows messages about the password
update.public void setResourceBundle(ResourceBundle resourceBundle)
InternationalizationsetResourceBundle in interface InternationalizationresourceBundle - the new language bundle.public Vector getTextsToTranslate()
InternationalizationgetTextsToTranslate in interface Internationalizationprotected void addTextToTranslate(Internationalization component, Vector texts)
component to the Vector of texts to translatecomponent - The component to be translatedtexts - The Vector of texts to be translatedgetTextsToTranslate()public String getPasswordValue()
String of the new password
Conditions to return the new password String:
newPassword is not nullrepeatNewPassword is not nullnewPassword and repeatNewPassword are equalsgetPasswordValue in interface IChangePasswordDialogString of the new password, if all conditions are
satisfied, otherwise nullpublic EntityResult setPassword(String password)
user, who expires its password valid time, a new one.
If locator is an instance of UtilReferenceLocator, it
creates a Hashtable with the "password", and a
Hashtable with the the user and the oldPassword
, as AttributtesValue and KeyValues of the method
UtilReferenceLocator.changePassword(String, int, Hashtable, Hashtable)setPassword in interface IChangePasswordDialogpassword - The new passwordEntityResult of change the password if
locator is instance of UtilReferenceLocator,
null otherwiseUtilReferenceLocator.changePassword(String, int, Hashtable,
Hashtable)public void showChangePassword()
showChangePassword in interface IChangePasswordDialogpublic void showChangePasswordInParentLocation(Window w)
This method obtain the top-left point of the parent window and move it to
the center of the parent window. Then, move the x and y
coordinates so that their translation is half the height and width of the
change password dialog, setting the point in the upper left corner, and
using it to set the location of the change password dialog
showChangePasswordInParentLocation in interface IChangePasswordDialogw - Parent windowCopyright © 2016 Imatia Innovation S.L.. All rights reserved.