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.DialogWidth
Nested 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.DetachListener
Nested 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.Listener
Nested 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.ComponentDetachListener
Nested classes/interfaces inherited from interface com.vaadin.ui.Layout
com.vaadin.ui.Layout.AlignmentHandler, com.vaadin.ui.Layout.MarginHandler, com.vaadin.ui.Layout.SpacingHandler
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
com.vaadin.server.Sizeable.Unit
-
Field Summary
Fields inherited from class com.vaadin.ui.AbstractOrderedLayout
ALIGNMENT_DEFAULT, components
Fields inherited from class com.vaadin.ui.AbstractComponent
DESIGN_ATTR_PLAIN_TEXT
Fields 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
ConstructorDescriptionCmsUserEditDialog
(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 TypeMethodDescriptionvoid
fetchPassword
(String password) Fetches password.protected static void
iniRole
(CmsObject cms, String ou, com.vaadin.ui.ComboBox<CmsRole> roleComboBox, org.apache.commons.logging.Log log) Initialized the role ComboBox.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).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).protected boolean
Checks if a new user should be created.protected boolean
m_next Is password not matching to confirm field?protected boolean
Validates the password fields.protected boolean
Checks if currently the root site is chosen as start site.protected boolean
Checks if the chosen site is valid.protected boolean
Checks if the given path is valid resource in site.protected boolean
Checks if the currently chosen start view is visible for root site.protected boolean
isValid()
Checks if all fields are valid.protected void
save()
Saves the canged user data.protected static void
Sends an email to the user.protected static void
sendMail
(CmsObject cms, String password, CmsUser user, String ou, boolean newUser, boolean changePassword) Sends an email to the user.protected void
Sets the visibility of the buttons.protected void
En/Diables the email box.protected void
setupStartFolder
(String startFolder) Sets the start folder depending on current set site field.protected void
Sets up the validators.protected void
Switches to the next tab.protected boolean
userAlreadyExists
(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, setWindowMinFullHeight
Methods inherited from class com.vaadin.ui.VerticalLayout
addComponentsAndExpand, getState, getState
Methods 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, writeDesign
Methods inherited from class com.vaadin.ui.AbstractLayout
readMargin, writeMargin
Methods inherited from class com.vaadin.ui.AbstractComponentContainer
addComponentAttachListener, addComponentDetachListener, addComponents, fireComponentAttachEvent, fireComponentDetachEvent, getComponentIterator, moveComponentsFrom, removeAllComponents, removeComponentAttachListener, removeComponentDetachListener, setHeight, setWidth
Methods 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, setWidthUndefined
Methods 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, updateDiffstate
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods 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, setErrorHandler
Methods 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, setVisible
Methods inherited from interface com.vaadin.ui.ComponentContainer
addComponents, getComponentIterator, moveComponentsFrom, removeAllComponents
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
Methods inherited from interface com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier
addComponentAttachListener, addComponentDetachListener, removeComponentAttachListener, removeComponentDetachListener
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods 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_CmsPasswordFetcher
Fetches password.- Specified by:
fetchPassword
in 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
-