]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/views/JcrUsersView.java
First draft of User Creation wizard
[lgpl/argeo-commons.git] / org.argeo.security.ui.admin / src / org / argeo / security / ui / admin / views / JcrUsersView.java
1 /*
2 * Copyright (C) 2007-2012 Argeo GmbH
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.argeo.security.ui.admin.views;
17
18 public class JcrUsersView {
19 }
20 /** List all users with filter. Legacy. TODO Remove */
21 // public class JcrUsersView extends ViewPart implements ArgeoNames {
22 // public final static String ID = SecurityAdminPlugin.PLUGIN_ID
23 // + ".jcrUsersView";
24 //
25 // /* DEPENDENCY INJECTION */
26 // private Session session;
27 //
28 // private UsersTable userTableCmp;
29 // private JcrUserListener userStructureListener;
30 // private JcrUserListener userPropertiesListener;
31 //
32 // @Override
33 // public void createPartControl(Composite parent) {
34 // parent.setLayout(new FillLayout());
35 //
36 // // Create the composite that displays the list and a filter
37 // userTableCmp = new UsersTable(parent, SWT.NO_FOCUS, session);
38 // userTableCmp.populate(true, false);
39 //
40 // // Configure
41 // userTableCmp.getTableViewer().addDoubleClickListener(
42 // new ViewDoubleClickListener());
43 // getViewSite().setSelectionProvider(userTableCmp.getTableViewer());
44 //
45 // // Add listener to refresh the list when something changes
46 // userStructureListener = new JcrUserListener(getSite().getShell()
47 // .getDisplay());
48 // JcrUtils.addListener(session, userStructureListener, Event.NODE_ADDED
49 // | Event.NODE_REMOVED, ArgeoJcrConstants.PEOPLE_BASE_PATH, null);
50 // userPropertiesListener = new JcrUserListener(getSite().getShell()
51 // .getDisplay());
52 // JcrUtils.addListener(session, userStructureListener,
53 // Event.PROPERTY_CHANGED | Event.PROPERTY_ADDED
54 // | Event.PROPERTY_REMOVED,
55 // ArgeoJcrConstants.PEOPLE_BASE_PATH,
56 // ArgeoTypes.ARGEO_USER_PROFILE);
57 // }
58 //
59 // @Override
60 // public void setFocus() {
61 // userTableCmp.setFocus();
62 // }
63 //
64 // @Override
65 // public void dispose() {
66 // JcrUtils.removeListenerQuietly(session, userStructureListener);
67 // JcrUtils.removeListenerQuietly(session, userPropertiesListener);
68 // JcrUtils.logoutQuietly(session);
69 // super.dispose();
70 // }
71 //
72 // // public void setSession(Session session) {
73 // // this.session = session;
74 // // }
75 //
76 // public void refresh() {
77 // this.getSite().getShell().getDisplay().asyncExec(new Runnable() {
78 // @Override
79 // public void run() {
80 // userTableCmp.refresh();
81 // }
82 // });
83 // }
84 //
85 // private class JcrUserListener implements EventListener {
86 // private final Display display;
87 //
88 // public JcrUserListener(Display display) {
89 // super();
90 // this.display = display;
91 // }
92 //
93 // @Override
94 // public void onEvent(EventIterator events) {
95 // display.asyncExec(new Runnable() {
96 // @Override
97 // public void run() {
98 // userTableCmp.refresh();
99 // }
100 // });
101 // }
102 // }
103 //
104 // class ViewDoubleClickListener implements IDoubleClickListener {
105 // public void doubleClick(DoubleClickEvent evt) {
106 // if (evt.getSelection().isEmpty())
107 // return;
108 //
109 // Object obj = ((IStructuredSelection) evt.getSelection())
110 // .getFirstElement();
111 // if (obj instanceof Node) {
112 // try {
113 // String username = ((Node) obj).getProperty(ARGEO_USER_ID)
114 // .getString();
115 // String commandId = OpenArgeoUserEditor.COMMAND_ID;
116 // String paramName = OpenArgeoUserEditor.PARAM_USERNAME;
117 // CommandUtils.callCommand(commandId, paramName, username);
118 // } catch (RepositoryException e) {
119 // throw new ArgeoException("Cannot open user editor", e);
120 // }
121 // }
122 // }
123 // }
124 //
125 // /* DEPENDENCY INJECTION */
126 // public void setRepository(Repository repository) {
127 // try {
128 // session = repository.login();
129 // } catch (RepositoryException re) {
130 // throw new ArgeoException("Unable to initialise local session", re);
131 // }
132 // }
133 // }