]> git.argeo.org Git - lgpl/argeo-commons.git/blob - commands/RefreshUsersList.java
Prepare next development cycle
[lgpl/argeo-commons.git] / commands / RefreshUsersList.java
1 package org.argeo.security.ui.admin.commands;
2
3 import org.argeo.security.UserAdminService;
4 import org.argeo.security.ui.admin.views.UsersView;
5 import org.eclipse.core.commands.AbstractHandler;
6 import org.eclipse.core.commands.ExecutionEvent;
7 import org.eclipse.core.commands.ExecutionException;
8 import org.eclipse.ui.handlers.HandlerUtil;
9
10 /** Refresh the main EBI list. */
11 public class RefreshUsersList extends AbstractHandler {
12 private UserAdminService userAdminService;
13
14 public Object execute(ExecutionEvent event) throws ExecutionException {
15 userAdminService.synchronize();
16 UsersView view = (UsersView) HandlerUtil
17 .getActiveWorkbenchWindow(event).getActivePage()
18 .findView(UsersView.ID);
19 view.refresh();
20 return null;
21 }
22
23 public void setUserAdminService(UserAdminService userAdminService) {
24 this.userAdminService = userAdminService;
25 }
26
27 }