Package org.opencms.ui.apps.user
Class CmsUserEditDialog
java.lang.Object
com.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractComponentContainer
com.vaadin.ui.AbstractLayout
com.vaadin.ui.AbstractOrderedLayout
com.vaadin.ui.VerticalLayout
org.opencms.ui.components.CmsBasicDialog
org.opencms.ui.apps.user.CmsUserEditDialog
- All Implemented Interfaces:
com.vaadin.event.ContextClickEvent.ContextClickNotifier,com.vaadin.event.LayoutEvents.LayoutClickNotifier,com.vaadin.event.MethodEventSource,com.vaadin.server.ClientConnector,com.vaadin.server.Sizeable,com.vaadin.shared.Connector,com.vaadin.ui.Component,com.vaadin.ui.ComponentContainer,com.vaadin.ui.HasComponents,com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier,com.vaadin.ui.Layout,com.vaadin.ui.Layout.AlignmentHandler,com.vaadin.ui.Layout.MarginHandler,com.vaadin.ui.Layout.SpacingHandler,Serializable,Iterable<com.vaadin.ui.Component>,I_CmsPasswordFetcher
Class for the dialog to edit user settings.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opencms.ui.components.CmsBasicDialog
CmsBasicDialog.DialogWidthNested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListenerNested classes/interfaces inherited from interface com.vaadin.ui.Component
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.ListenerNested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListenerNested classes/interfaces inherited from interface com.vaadin.ui.Layout
com.vaadin.ui.Layout.AlignmentHandler, com.vaadin.ui.Layout.MarginHandler, com.vaadin.ui.Layout.SpacingHandlerNested classes/interfaces inherited from interface com.vaadin.server.Sizeable
com.vaadin.server.Sizeable.Unit -
Field Summary
FieldsFields inherited from class com.vaadin.ui.AbstractOrderedLayout
ALIGNMENT_DEFAULT, componentsFields inherited from class com.vaadin.ui.AbstractComponent
DESIGN_ATTR_PLAIN_TEXTFields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS -
Constructor Summary
ConstructorsConstructorDescriptionCmsUserEditDialog(CmsObject cms, com.vaadin.ui.Window window, String ou, CmsAccountsApp app) public constructor for new user case.CmsUserEditDialog(CmsObject cms, CmsUUID userId, com.vaadin.ui.Window window, CmsAccountsApp app) public constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidfetchPassword(String password) Fetches password.protected static voidiniRole(CmsObject cms, String ou, com.vaadin.ui.ComboBox<CmsRole> roleComboBox, org.apache.commons.logging.Log log) Initialized the role ComboBox.protected static voidiniRole(CmsObject cms, String ou, com.vaadin.v7.ui.ComboBox roleComboBox, org.apache.commons.logging.Log log) Initialized the role ComboBox (vaadin-v7-version).protected static voidiniRole(CmsObject cms, String ou, com.vaadin.v7.ui.ComboBox roleComboBox, org.apache.commons.logging.Log log, boolean includeNoRoleEntry) Initialized the role ComboBox (vaadin-v7-version).protected booleanChecks if a new user should be created.protected booleanm_next Is password not matching to confirm field?protected booleanValidates the password fields.protected booleanChecks if currently the root site is chosen as start site.protected booleanChecks if the chosen site is valid.protected booleanChecks if the given path is valid resource in site.protected booleanChecks if the currently chosen start view is visible for root site.protected booleanisValid()Checks if all fields are valid.protected voidsave()Saves the canged user data.protected static voidSends an email to the user.protected static voidsendMail(CmsObject cms, String password, CmsUser user, String ou, boolean newUser, boolean changePassword) Sends an email to the user.protected voidSets the visibility of the buttons.protected voidEn/Diables the email box.protected voidsetupStartFolder(String startFolder) Sets the start folder depending on current set site field.protected voidSets up the validators.protected voidSwitches to the next tab.protected booleanuserAlreadyExists(String username) Checks if given user exists.Methods inherited from class org.opencms.ui.components.CmsBasicDialog
addButton, addButton, createButtonCancel, createButtonClose, createButtonOK, createResourceListPanel, createResourceListPanelDirectly, displayResourceInfo, displayResourceInfo, displayResourceInfo, displayResourceInfoDirectly, enableMaxHeight, getInfoResources, initActionHandler, prepareWindow, prepareWindow, readDesign, setAbove, setActionHandler, setBelow, setContent, setContentMinHeight, setContentVisibility, setWindowMinFullHeightMethods inherited from class com.vaadin.ui.VerticalLayout
addComponentsAndExpand, getState, getStateMethods inherited from class com.vaadin.ui.AbstractOrderedLayout
addComponent, addComponent, addComponentAsFirst, addLayoutClickListener, getComponent, getComponentAlignment, getComponentCount, getComponentIndex, getCustomAttributes, getDefaultComponentAlignment, getExpandRatio, getMargin, isSpacing, iterator, removeComponent, removeLayoutClickListener, replaceComponent, setComponentAlignment, setDefaultComponentAlignment, setExpandRatio, setMargin, setMargin, setSpacing, writeDesignMethods inherited from class com.vaadin.ui.AbstractLayout
readMargin, writeMarginMethods inherited from class com.vaadin.ui.AbstractComponentContainer
addComponentAttachListener, addComponentDetachListener, addComponents, fireComponentAttachEvent, fireComponentDetachEvent, getComponentIterator, moveComponentsFrom, removeAllComponents, removeComponentAttachListener, removeComponentDetachListener, setHeight, setWidthMethods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isReadOnly, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setReadOnly, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthFull, setWidthUndefinedMethods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlerMethods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisibleMethods inherited from interface com.vaadin.ui.ComponentContainer
addComponents, getComponentIterator, moveComponentsFrom, removeAllComponentsMethods inherited from interface com.vaadin.shared.Connector
getConnectorIdMethods inherited from interface com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier
addComponentAttachListener, addComponentDetachListener, removeComponentAttachListener, removeComponentDetachListenerMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined
-
Field Details
-
m_visSites
Visible sites?
-
-
Constructor Details
-
CmsUserEditDialog
public CmsUserEditDialog(CmsObject cms, CmsUUID userId, com.vaadin.ui.Window window, CmsAccountsApp app) public constructor.- Parameters:
cms- CmsObjectuserId- id of userwindow- to be closedapp- account app instance
-
CmsUserEditDialog
public constructor for new user case.- Parameters:
cms- CmsObjectwindow- Windowou- organizational unitapp- accounts app instance
-
-
Method Details
-
iniRole
protected static void iniRole(CmsObject cms, String ou, com.vaadin.ui.ComboBox<CmsRole> roleComboBox, org.apache.commons.logging.Log log) Initialized the role ComboBox. (Vaadin 8 version)- Parameters:
cms- CmsObjectou- to load roles forroleComboBox- ComboBoxlog- LOG
-
iniRole
protected static void iniRole(CmsObject cms, String ou, com.vaadin.v7.ui.ComboBox roleComboBox, org.apache.commons.logging.Log log) Initialized the role ComboBox (vaadin-v7-version).- Parameters:
cms- CmsObjectou- to load roles forroleComboBox- ComboBoxlog- LOG
-
iniRole
protected static void iniRole(CmsObject cms, String ou, com.vaadin.v7.ui.ComboBox roleComboBox, org.apache.commons.logging.Log log, boolean includeNoRoleEntry) Initialized the role ComboBox (vaadin-v7-version).- Parameters:
cms- CmsObjectou- to load roles forroleComboBox- ComboBoxlog- LOGincludeNoRoleEntry- with noRole entry?
-
sendMail
protected static void sendMail(CmsObject cms, String password, CmsUser user, boolean newUser, boolean changePassword) Sends an email to the user.- Parameters:
cms- CmsObjectpassword- of the useruser- user to send mail tonewUser- flag indicates if user is newchangePassword- has the user to change password?
-
sendMail
protected static void sendMail(CmsObject cms, String password, CmsUser user, String ou, boolean newUser, boolean changePassword) Sends an email to the user.- Parameters:
cms- CmsObjectpassword- of the useruser- user to send mail toou- namenewUser- flag indicates if user is newchangePassword- has the user to change password?
-
fetchPassword
Description copied from interface:I_CmsPasswordFetcherFetches password.- Specified by:
fetchPasswordin interfaceI_CmsPasswordFetcher- Parameters:
password- string- See Also:
-
isNewUser
Checks if a new user should be created.- Returns:
- true, if create user function
-
isPasswordMismatchingConfirm
m_next Is password not matching to confirm field?- Returns:
- true, if password not equal to confirm
-
isPasswordValid
Validates the password fields.- Returns:
- true if password is valid (and confirm field matches password field).
-
isRootSiteSelected
Checks if currently the root site is chosen as start site.- Returns:
- true if root site was selected
-
isSiteNull
Checks if the chosen site is valid.- Returns:
- true if site is null
-
isSitePathValid
Checks if the given path is valid resource in site.- Returns:
- true if the resource is valid
-
isStartViewAvailableOnRoot
Checks if the currently chosen start view is visible for root site.- Returns:
- true if app is available for root site
-
isValid
Checks if all fields are valid. If not the tab of the first invalid field gets chosen.- Returns:
- true, if everything is ok
-
save
Saves the canged user data. -
setButtonVisibility
Sets the visibility of the buttons. -
setEmailBox
En/Diables the email box. -
setupStartFolder
Sets the start folder depending on current set site field.- Parameters:
startFolder- default value or null
-
setupValidators
Sets up the validators. -
switchTab
Switches to the next tab. -
userAlreadyExists
Checks if given user exists.- Parameters:
username- to check- Returns:
- boolean
-