public class UserAccountDefinition
extends com.google.gwt.user.client.ui.Composite
Modifier and Type | Class and Description |
---|---|
private static class |
UserAccountDefinition.UIData
Holds custom authentication plugins and peer certificates.
|
static class |
UserAccountDefinition.UserData
User Account model
|
Modifier and Type | Field and Description |
---|---|
private InputDialog.Field |
acctDisabled
The account disabled field
|
(package private) AccountExtension |
acctExtension
The account extension
|
private InputDialog.Field |
acctName
The account name field
|
private AdminServiceAsync |
adminService
The administration server interface
|
private Alarm |
alarm
The server alarm manager
|
private InputDialog.Field |
certificates
The account certificates field
|
private boolean |
edit
The edit boolean flag which true value indicates the edit use case.
|
private InputDialog |
inputDialog
The common input dialog
|
private com.google.inject.Provider<InputDialog> |
inputDialogProvider
The common input dialogs provider
|
private InputDialog.Field |
mode
The account mode field
|
private InputDialog.Field |
password
The new password field
|
private InputDialog.Field |
password2
The confirmed password field
|
private InputDialog.Field |
person
The account person field
|
private InputDialog.Field |
plugin
The account custom authentication plugin field
|
private InputDialog.Field |
secSelect
The account security options field
|
Constructor and Description |
---|
UserAccountDefinition(com.google.inject.Provider<InputDialog> inputDialogProvider,
AdminServiceAsync adminService,
Alarm alarm)
Creates the User Account Definition delegate.
|
Modifier and Type | Method and Description |
---|---|
private void |
bindHandlers()
Attaches the dialog's input handlers
|
void |
build(UserDef uDef,
java.util.function.Consumer<java.lang.Boolean> doneHandler)
Builds the dialog's fields of the User Account Definition View.
|
private void |
buildStandardFields(UserDef uDef,
java.util.function.Consumer<java.util.ArrayList<InputDialog.Item>> doneHandler)
Builds the standard dialog's fields for the given user account definition.
|
private void |
buildStep2(UserDef uDef,
InputDialog.Item[] items,
java.util.function.Consumer<java.lang.Boolean> doneHandler)
Builds the extended user account fields.
|
private java.util.List<org.gwtbootstrap3.extras.select.client.ui.Option> |
getAuthModes()
Builds the list of authentication options.
|
private void |
loadUIData(java.util.function.Consumer<UserAccountDefinition.UIData> doneHandler)
Loads UIData asynchronously and invokes the given result's consumer if this action is
completed successfully.
|
private void |
saveUIData(UserDef target,
java.util.Map<InputDialog.Field,java.lang.Object> values)
Saves the user's input data into the target user account definition.
|
void |
show(com.google.gwt.user.client.ui.HasWidgets parent,
UserDef uDef,
java.util.function.Consumer<UserAccountDefinition.UserData> doneHandler)
Shows the User Definition View dialog.
|
private void |
updateUIState()
Updates the input fields states depending on the custom authentication plugin input and
the selected password option.
|
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
@Inject(optional=true) AccountExtension acctExtension
private final com.google.inject.Provider<InputDialog> inputDialogProvider
private final AdminServiceAsync adminService
private final Alarm alarm
private boolean edit
private InputDialog inputDialog
private InputDialog.Field acctName
private InputDialog.Field acctDisabled
private InputDialog.Field person
private InputDialog.Field mode
private InputDialog.Field plugin
private InputDialog.Field certificates
private InputDialog.Field secSelect
private InputDialog.Field password
private InputDialog.Field password2
@Inject public UserAccountDefinition(com.google.inject.Provider<InputDialog> inputDialogProvider, AdminServiceAsync adminService, Alarm alarm)
inputDialogProvider
- The injected common input dialogs provideradminService
- The injected administration server interfacealarm
- The injected server alarm managerpublic void build(UserDef uDef, java.util.function.Consumer<java.lang.Boolean> doneHandler)
uDef
- The given user account definitiondoneHandler
- The completion consumerpublic void show(com.google.gwt.user.client.ui.HasWidgets parent, UserDef uDef, java.util.function.Consumer<UserAccountDefinition.UserData> doneHandler)
parent
- The parent container for the User Definition View dialoguDef
- The user account definitiondoneHandler
- The consumer of the user account modelprivate void buildStep2(UserDef uDef, InputDialog.Item[] items, java.util.function.Consumer<java.lang.Boolean> doneHandler)
uDef
- The given user account definitionitems
- The standard user account fieldsdoneHandler
- The completion consumerprivate void buildStandardFields(UserDef uDef, java.util.function.Consumer<java.util.ArrayList<InputDialog.Item>> doneHandler)
uDef
- The given user account definitiondoneHandler
- The consumer of the dialog's fieldsprivate void bindHandlers()
private java.util.List<org.gwtbootstrap3.extras.select.client.ui.Option> getAuthModes()
private void loadUIData(java.util.function.Consumer<UserAccountDefinition.UIData> doneHandler)
doneHandler
- The given result's consumerprivate void saveUIData(UserDef target, java.util.Map<InputDialog.Field,java.lang.Object> values)
target
- The target user account definitionvalues
- The map of the dialog's fields to their valuesprivate void updateUIState()