public class OsUsersPresenter extends AccountsPresenter<OsUsersPresenter.MyView,OsUsersPresenter.MyProxy> implements OsUsersUIHandlers
| Modifier and Type | Class and Description |
|---|---|
static interface |
OsUsersPresenter.MyProxy
Defines the proxy place for GWTP framework.
|
static interface |
OsUsersPresenter.MyView
This view interface that must be implemented by the concrete view according to GWTP
framework.
|
private static class |
OsUsersPresenter.OsUsersViewStates
Defines user accounts view states.
|
| Modifier and Type | Field and Description |
|---|---|
private AdminServiceAsync |
adminService
Administration server interface
|
private FindOsUserAccount |
findOsUserAccountManager
The Find OS User Account manager
|
private com.google.inject.Provider<InputDialog> |
inputDialogProvider
The common input dialogs provider
|
private static boolean[] |
MASK_WEST_CENTER
mask definition - west-center
|
static com.gwtplatform.mvp.client.presenter.slots.NestedSlot |
MODAL_CONTENT
The attachment point for modal dialogs on this view
|
private ModalDialogs |
modalDialogsManager
The common modal dialogs manager
|
private OsUserDef |
selectedUser
The currently selected user
|
private java.util.Set<OsUserDef> |
selectedUsers
The set of selected users
|
private Alarm |
serverAlarmsManager
The server alarms manager
|
private static boolean[] |
STATE_INITIAL_EMPTY
state definition - initial empty
|
private static boolean[] |
STATE_USER_ADD
state definition - group definition creation
|
private static boolean[] |
STATE_USER_EDIT
state definition - group definition editing
|
private static boolean[] |
STATE_USERS_MULTI
state definition - multiple selection in users list
|
private static boolean[] |
STATE_USERS_SINGLE
state definition - single selection in users list
|
private com.google.inject.Provider<AddEditOsUserWidget> |
uadProvider
The user account definition provider
|
FILTER, filterExp, loggerBLANK_FIELD_WARNING, CONFIRM_PASSWORD_WARNING, NEW_ACCOUNT_NAME_WARNING| Constructor and Description |
|---|
OsUsersPresenter(com.google.web.bindery.event.shared.EventBus eventBus,
OsUsersPresenter.MyView view,
OsUsersPresenter.MyProxy proxy,
com.gwtplatform.mvp.client.proxy.PlaceManager placeManager,
ViewStateMachine viewStateMachine,
AdminServiceAsync adminService,
ModalDialogs modalDialogsManager,
Alarm serverAlarmsManager,
com.google.inject.Provider<AddEditOsUserWidget> uadProvider,
com.google.inject.Provider<InputDialog> inputDialogProvider,
AccountExtensionHolder acctExtensionHolder,
ACLPopupPresenter aclPopupPresenterProvider)
Defines the Users presenter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addUser(OsUserDef newUser)
Adds a new user.
|
void |
cancelAddUserAccountDialog()
Cancels the Add User Account Dialog and rolls back any related changes.
|
void |
cancelDeletingUsersAlert()
Cancels the Deleting Users Alert and rolls back any related changes.
|
void |
cancelEditUserAccountDialog()
Cancels the Edit User Account Dialog and rolls back any related changes.
|
void |
cancelFindUserAccountDialog()
Cancels the Find User Account Dialog and rolls back any related changes.
|
private void |
checkAssociatedFwdUsers(TaggedName[] osUsers,
int currentIndex)
Checks if the selected OS users are associated with FWD accounts.
|
void |
deleteSelectedUsers(TaggedName[] users)
Deletes the given selected users accounts.
|
void |
disableUserAccount(TaggedName user)
Disables the target user account.
|
void |
onRefresh()
Triggers an action to refresh the all users table.
|
protected void |
onReset()
Lifecycle method called on all visible presenters whenever a
presenter is revealed anywhere in the presenter hierarchy.
|
void |
onUserSelected(java.util.Set<TaggedName> users)
Triggers the users selection changed event.
|
void |
setupDeletingUsersAlert(TaggedName[] users)
Setups the Deleting Users Alert.
|
void |
setupFindUserAccountDialog()
Setups the Find User Account Dialog.
|
void |
showAddUserAccountDialog()
Shows the Add OS User Account Dialog.
|
void |
showEditUserAccountDialog(TaggedName updatedUserAccount)
Shows the Edit User Account Dialog to edit the target user account.
|
void |
updateUser(OsUserDef user)
Updates a given user account.
|
private void |
updateUsersList()
Retrieves the user list and fills the all users table model.
|
private void |
updateUsersList(java.lang.Runnable callback)
Retrieves the user list and fills the all users table model and executes a given command on
getting the user list.
|
setCurrentState, switchToACLschangeState, restoreState, setStatebackTo, clearRequestParameter, getCurrentFilter, getCurrentParameter, getPlaceManager, getQueryParametersMap, getQueryString, getQueryString, setFilter, updateBrowserHistorybind, forceReveal, getProxy, getRevealType, getSlot, prepareFromRequest, revealInParent, setRevealType, setSlot, unbind, useManualRevealaddHandler, addRegisteredHandler, addToPopupSlot, addToPopupSlot, addToSlot, addToSlot, addVisibleHandler, asWidget, clearSlot, clearSlot, equals, fireEvent, fireEvent, getChild, getChildren, getChildren, getEventBus, getView, hashCode, isVisible, onHide, onReveal, registerVisibleHandler, removeFromParentSlot, removeFromPopupSlot, removeFromSlot, removeFromSlot, setInSlot, setInSlot, setInSlot, setInSlotisBound, onBind, onUnbind, registerHandlerclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitsetCurrentState, switchToACLsprivate static final boolean[] STATE_INITIAL_EMPTY
private static final boolean[] STATE_USER_ADD
private static final boolean[] STATE_USER_EDIT
private static final boolean[] STATE_USERS_SINGLE
private static final boolean[] STATE_USERS_MULTI
private static final boolean[] MASK_WEST_CENTER
public static final com.gwtplatform.mvp.client.presenter.slots.NestedSlot MODAL_CONTENT
private final AdminServiceAsync adminService
private final ModalDialogs modalDialogsManager
private final Alarm serverAlarmsManager
private OsUserDef selectedUser
private final java.util.Set<OsUserDef> selectedUsers
private final com.google.inject.Provider<AddEditOsUserWidget> uadProvider
private final com.google.inject.Provider<InputDialog> inputDialogProvider
private final FindOsUserAccount findOsUserAccountManager
@Inject
public OsUsersPresenter(com.google.web.bindery.event.shared.EventBus eventBus,
OsUsersPresenter.MyView view,
OsUsersPresenter.MyProxy proxy,
com.gwtplatform.mvp.client.proxy.PlaceManager placeManager,
@Named(value="OsUsersViewStateMachine")
ViewStateMachine viewStateMachine,
AdminServiceAsync adminService,
ModalDialogs modalDialogsManager,
Alarm serverAlarmsManager,
com.google.inject.Provider<AddEditOsUserWidget> uadProvider,
com.google.inject.Provider<InputDialog> inputDialogProvider,
AccountExtensionHolder acctExtensionHolder,
ACLPopupPresenter aclPopupPresenterProvider)
eventBus - The event busview - The associated viewproxy - The proxy placeplaceManager - The place managerviewStateMachine - The view state machineadminService - The administration servicemodalDialogsManager - The common modal dialogs managerserverAlarmsManager - The server alarmsuadProvider - The user account definition providerinputDialogProvider - InputDialog provideracctExtensionHolder - The account extension holderaclPopupPresenterProvider - The ACL popup presenter providerprotected void onReset()
Important: Make sure you call your superclass onReset() if
you override. Also, do not call directly, fire a
ResetPresentersEvent to perform a reset manually.
See PresenterWidget for more details on lifecycle
methods.
This is one of the most frequently used lifecycle method. This is usually a good place to refresh any information displayed by your presenter.
Note that onReset() is not called only when using
PresenterWidget.addToSlot(Object, PresenterWidget), PresenterWidget.addToPopupSlot(PresenterWidget)
or PresenterWidget.setInSlot(Object, PresenterWidget, boolean) with false as the third
parameter.
In a presenter hierarchy, this method is called top-down: first on the parent presenters, then on the children.
onReset in class com.gwtplatform.mvp.client.PresenterWidget<OsUsersPresenter.MyView>public void onRefresh()
onRefresh in interface OsUsersUIHandlersprivate void updateUsersList()
private void updateUsersList(java.lang.Runnable callback)
callback - The given command to execute on getting the datapublic void showAddUserAccountDialog()
showAddUserAccountDialog in interface OsUsersUIHandlerspublic void setupDeletingUsersAlert(TaggedName[] users)
setupDeletingUsersAlert in interface OsUsersUIHandlersusers - The array of users accounts given by tagged namesprivate void checkAssociatedFwdUsers(TaggedName[] osUsers, int currentIndex)
osUsers - The array of OS users to be checkedcurrentIndex - The index of the current element in the array of OS users. Used for recursion.public void showEditUserAccountDialog(TaggedName updatedUserAccount)
showEditUserAccountDialog in interface OsUsersUIHandlersupdatedUserAccount - The target user account given by its tagged namepublic void cancelAddUserAccountDialog()
cancelAddUserAccountDialog in interface OsUsersUIHandlerspublic void cancelDeletingUsersAlert()
cancelDeletingUsersAlert in interface OsUsersUIHandlerspublic void cancelEditUserAccountDialog()
cancelEditUserAccountDialog in interface OsUsersUIHandlerspublic void deleteSelectedUsers(TaggedName[] users)
deleteSelectedUsers in interface OsUsersUIHandlersusers - The array of users accounts given by tagged namespublic void onUserSelected(java.util.Set<TaggedName> users)
onUserSelected in interface OsUsersUIHandlersusers - The selected users accountspublic void addUser(OsUserDef newUser)
addUser in interface OsUsersUIHandlersnewUser - The new user definitionpublic void updateUser(OsUserDef user)
updateUser in interface OsUsersUIHandlersuser - The given user definitionpublic void cancelFindUserAccountDialog()
cancelFindUserAccountDialog in interface OsUsersUIHandlerspublic void setupFindUserAccountDialog()
setupFindUserAccountDialog in interface OsUsersUIHandlerspublic void disableUserAccount(TaggedName user)
disableUserAccount in interface OsUsersUIHandlersuser - The target user account given by its tagged name