You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2016/03/31 17:29:02 UTC

[08/10] syncope git commit: [SYNCOPE-156] Internal refactoring

http://git-wip-us.apache.org/repos/asf/syncope/blob/3e8912c3/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
index 5857c3f..b36975a 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemaTypePanel.java
@@ -32,7 +32,7 @@ import org.apache.commons.collections4.Transformer;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.syncope.client.console.SyncopeConsoleSession;
 import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.commons.SearchableDataProvider;
+import org.apache.syncope.client.console.commons.DirectoryDataProvider;
 import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
 import org.apache.syncope.client.console.panels.SchemaTypePanel.SchemaProvider;
 import org.apache.syncope.client.console.rest.SchemaRestClient;
@@ -62,7 +62,7 @@ import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.ResourceModel;
 import org.springframework.util.ReflectionUtils;
 
-public class SchemaTypePanel extends AbstractTypesPanel<AbstractSchemaTO, SchemaProvider> {
+public class SchemaTypePanel extends TypesDirectoryPanel<AbstractSchemaTO, SchemaProvider> {
 
     private static final long serialVersionUID = 3905038169553185171L;
 
@@ -255,7 +255,7 @@ public class SchemaTypePanel extends AbstractTypesPanel<AbstractSchemaTO, Schema
         return columns;
     }
 
-    protected final class SchemaProvider extends SearchableDataProvider<AbstractSchemaTO> {
+    protected final class SchemaProvider extends DirectoryDataProvider<AbstractSchemaTO> {
 
         private static final long serialVersionUID = -185944053385660794L;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/3e8912c3/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionsPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionsPanel.java
index 5317df8..4db7acf 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionsPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SecurityQuestionsPanel.java
@@ -30,7 +30,7 @@ import java.util.Map;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.syncope.client.console.SyncopeConsoleSession;
 import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.commons.SearchableDataProvider;
+import org.apache.syncope.client.console.commons.DirectoryDataProvider;
 import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
 import org.apache.syncope.client.console.panels.SecurityQuestionsPanel.SecurityQuestionsProvider;
 import org.apache.syncope.client.console.rest.SecurityQuestionRestClient;
@@ -54,7 +54,7 @@ import org.apache.wicket.model.CompoundPropertyModel;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.ResourceModel;
 
-public class SecurityQuestionsPanel extends AbstractSearchResultPanel<
+public class SecurityQuestionsPanel extends DirectoryPanel<
         SecurityQuestionTO, SecurityQuestionTO, SecurityQuestionsProvider, SecurityQuestionRestClient> {
 
     private static final long serialVersionUID = 3323019773236588850L;
@@ -210,7 +210,7 @@ public class SecurityQuestionsPanel extends AbstractSearchResultPanel<
         return columns;
     }
 
-    protected final class SecurityQuestionsProvider extends SearchableDataProvider<SecurityQuestionTO> {
+    protected final class SecurityQuestionsProvider extends DirectoryDataProvider<SecurityQuestionTO> {
 
         private static final long serialVersionUID = -185944053385660794L;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/3e8912c3/client/console/src/main/java/org/apache/syncope/client/console/panels/TypesDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/TypesDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/TypesDirectoryPanel.java
new file mode 100644
index 0000000..cceb1e6
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/TypesDirectoryPanel.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.panels;
+
+import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal;
+import org.apache.syncope.client.console.commons.DirectoryDataProvider;
+import org.apache.syncope.client.console.rest.BaseRestClient;
+import org.apache.syncope.common.lib.AbstractBaseBean;
+import org.apache.wicket.PageReference;
+
+public abstract class TypesDirectoryPanel<T extends AbstractBaseBean, DP extends DirectoryDataProvider<T>>
+        extends DirectoryPanel<T, T, DP, BaseRestClient> {
+
+    private static final long serialVersionUID = 7890071604330629259L;
+
+    public TypesDirectoryPanel(final String id, final PageReference pageRef) {
+        super(id, pageRef);
+        setFooterVisibility(true);
+        modal.addSumbitButton();
+        modal.size(Modal.Size.Large);
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3e8912c3/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java
new file mode 100644
index 0000000..8fb9f66
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserDirectoryPanel.java
@@ -0,0 +1,286 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.panels;
+
+import java.io.Serializable;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import org.apache.commons.lang3.SerializationUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.SyncopeConsoleSession;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.rest.UserRestClient;
+import org.apache.syncope.client.console.status.StatusModal;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AttrColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.TokenColumn;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.client.console.wizards.AjaxWizard;
+import org.apache.syncope.client.console.wizards.WizardMgtPanel;
+import org.apache.syncope.client.console.wizards.any.AnyHandler;
+import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.AnyTypeClassTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.SchemaType;
+import org.apache.syncope.common.lib.types.StandardEntitlement;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+import org.apache.wicket.model.CompoundPropertyModel;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+import org.springframework.util.ReflectionUtils;
+
+public class UserDirectoryPanel extends AnyDirectoryPanel<UserTO> {
+
+    private static final long serialVersionUID = -1100228004207271270L;
+
+    protected UserDirectoryPanel(final String id, final Builder builder) {
+        super(id, builder);
+    }
+
+    @Override
+    protected String paginatorRowsKey() {
+        return Constants.PREF_USERS_PAGINATOR_ROWS;
+    }
+
+    @Override
+    protected Collection<ActionLink.ActionType> getBulkActions() {
+        final List<ActionLink.ActionType> bulkActions = new ArrayList<>();
+
+        bulkActions.add(ActionLink.ActionType.MUSTCHANGEPASSWORD);
+        bulkActions.add(ActionLink.ActionType.DELETE);
+        bulkActions.add(ActionLink.ActionType.SUSPEND);
+        bulkActions.add(ActionLink.ActionType.REACTIVATE);
+
+        return bulkActions;
+    }
+
+    @Override
+    protected List<IColumn<UserTO, String>> getColumns() {
+        final List<IColumn<UserTO, String>> columns = new ArrayList<>();
+
+        for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_DETAILS_VIEW)) {
+            final Field field = ReflectionUtils.findField(UserTO.class, name);
+
+            if ("token".equalsIgnoreCase(name)) {
+                columns.add(new TokenColumn<UserTO>(new ResourceModel(name, name), name));
+            } else if (field != null
+                    && (field.getType().equals(Boolean.class) || field.getType().equals(boolean.class))) {
+
+                columns.add(new BooleanPropertyColumn<UserTO>(new ResourceModel(name, name), name, name));
+            } else if (field != null && field.getType().equals(Date.class)) {
+                columns.add(new DatePropertyColumn<UserTO>(new ResourceModel(name, name), name, name));
+            } else {
+                columns.add(new PropertyColumn<UserTO, String>(new ResourceModel(name, name), name, name));
+            }
+        }
+
+        for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_PLAIN_ATTRS_VIEW)) {
+            if (pSchemaNames.contains(name)) {
+                columns.add(new AttrColumn<UserTO>(name, SchemaType.PLAIN));
+            }
+        }
+
+        for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_DER_ATTRS_VIEW)) {
+            if (dSchemaNames.contains(name)) {
+                columns.add(new AttrColumn<UserTO>(name, SchemaType.DERIVED));
+            }
+        }
+
+        // Add defaults in case of no selection
+        if (columns.isEmpty()) {
+            for (String name : UserDisplayAttributesModalPanel.DEFAULT_SELECTION) {
+                columns.add(new PropertyColumn<UserTO, String>(new ResourceModel(name, name), name, name));
+            }
+
+            prefMan.setList(getRequest(), getResponse(), Constants.PREF_USERS_DETAILS_VIEW,
+                    Arrays.asList(UserDisplayAttributesModalPanel.DEFAULT_SELECTION));
+        }
+
+        setWindowClosedReloadCallback(displayAttributeModal);
+
+        columns.add(new ActionColumn<UserTO, String>(new ResourceModel("actions")) {
+
+            private static final long serialVersionUID = -3503023501954863131L;
+
+            @Override
+            public ActionLinksPanel<UserTO> getActions(final String componentId, final IModel<UserTO> model) {
+                final ActionLinksPanel.Builder<UserTO> panel = ActionLinksPanel.builder();
+
+                panel.add(new ActionLink<UserTO>() {
+
+                    private static final long serialVersionUID = -7978723352517770644L;
+
+                    @Override
+                    public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+                        try {
+                            UserRestClient.class.cast(restClient).
+                                    mustChangePassword(model.getObject().getETagValue(), model.getObject().getKey());
+                            info(getString(Constants.OPERATION_SUCCEEDED));
+                            target.add(container);
+                        } catch (SyncopeClientException e) {
+                            LOG.error("While deleting object {}", model.getObject().getKey(), e);
+                            error(StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage());
+                        }
+                        SyncopeConsoleSession.get().getNotificationPanel().refresh(target);
+                    }
+                }, ActionLink.ActionType.MUSTCHANGEPASSWORD, StandardEntitlement.USER_UPDATE).add(
+                        new ActionLink<UserTO>() {
+
+                    private static final long serialVersionUID = -7978723352517770644L;
+
+                    @Override
+                    public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+
+                        final IModel<AnyHandler<UserTO>> formModel =
+                                new CompoundPropertyModel<>(new AnyHandler<>(model.getObject()));
+                        altDefaultModal.setFormModel(formModel);
+
+                        target.add(altDefaultModal.setContent(new StatusModal<>(
+                                altDefaultModal, pageRef, formModel.getObject().getInnerObject(), false)));
+
+                        altDefaultModal.header(new Model<>(
+                                getString("any.edit", new Model<>(new AnyHandler<>(model.getObject())))));
+
+                        altDefaultModal.show(true);
+                    }
+                }, ActionLink.ActionType.MANAGE_RESOURCES, StandardEntitlement.USER_READ).add(
+                                new ActionLink<UserTO>() {
+
+                            private static final long serialVersionUID = -7978723352517770644L;
+
+                            @Override
+                            public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+                                final IModel<AnyHandler<UserTO>> formModel = new CompoundPropertyModel<>(
+                                        new AnyHandler<>(model.
+                                                getObject()));
+                                altDefaultModal.setFormModel(formModel);
+
+                                target.add(altDefaultModal.setContent(new StatusModal<>(
+                                        altDefaultModal, pageRef, formModel.getObject().getInnerObject(), true)));
+
+                                altDefaultModal.header(new Model<>(
+                                        getString("any.edit", new Model<>(new AnyHandler<>(model.getObject())))));
+
+                                altDefaultModal.show(true);
+                            }
+                        }, ActionLink.ActionType.ENABLE, StandardEntitlement.USER_READ).add(new ActionLink<UserTO>() {
+
+                            private static final long serialVersionUID = -7978723352517770644L;
+
+                            @Override
+                            public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+                                send(UserDirectoryPanel.this, Broadcast.EXACT,
+                                        new AjaxWizard.EditItemActionEvent<>(
+                                                new AnyHandler<>(new UserRestClient().read(model.getObject().getKey())),
+                                                target));
+                            }
+                        }, ActionLink.ActionType.EDIT, StandardEntitlement.USER_READ).add(new ActionLink<UserTO>() {
+
+                    private static final long serialVersionUID = -7978723352517770644L;
+
+                    @Override
+                    public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+                        final UserTO clone = SerializationUtils.clone(model.getObject());
+                        clone.setKey(0L);
+                        send(UserDirectoryPanel.this, Broadcast.EXACT,
+                                new AjaxWizard.NewItemActionEvent<>(new AnyHandler<>(clone), target));
+                    }
+                }, ActionLink.ActionType.CLONE, StandardEntitlement.USER_CREATE).add(new ActionLink<UserTO>() {
+
+                    private static final long serialVersionUID = -7978723352517770644L;
+
+                    @Override
+                    public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
+                        try {
+                            restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
+                            info(getString(Constants.OPERATION_SUCCEEDED));
+                            target.add(container);
+                        } catch (SyncopeClientException e) {
+                            LOG.error("While deleting object {}", model.getObject().getKey(), e);
+                            error(StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage());
+                        }
+                        SyncopeConsoleSession.get().getNotificationPanel().refresh(target);
+                    }
+                }, ActionLink.ActionType.DELETE, StandardEntitlement.USER_DELETE);
+
+                return panel.build(componentId, model.getObject());
+            }
+
+            @Override
+            public ActionLinksPanel<Serializable> getHeader(final String componentId) {
+                final ActionLinksPanel.Builder<Serializable> panel = ActionLinksPanel.builder();
+
+                return panel.add(new ActionLink<Serializable>() {
+
+                    private static final long serialVersionUID = -7978723352517770644L;
+
+                    @Override
+                    public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
+                        target.add(displayAttributeModal.setContent(new UserDisplayAttributesModalPanel<>(
+                                displayAttributeModal, page.getPageReference(), pSchemaNames, dSchemaNames)));
+
+                        displayAttributeModal.header(new ResourceModel("any.attr.display"));
+                        displayAttributeModal.addSumbitButton();
+                        displayAttributeModal.show(true);
+                    }
+                }, ActionLink.ActionType.CHANGE_VIEW, StandardEntitlement.USER_READ).add(
+                        new ActionLink<Serializable>() {
+
+                    private static final long serialVersionUID = -7978723352517770644L;
+
+                    @Override
+                    public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
+                        if (target != null) {
+                            target.add(container);
+                        }
+                    }
+                }, ActionLink.ActionType.RELOAD, StandardEntitlement.USER_SEARCH).build(componentId);
+            }
+        });
+
+        return columns;
+    }
+
+    public static class Builder extends AnyDirectoryPanel.Builder<UserTO> {
+
+        private static final long serialVersionUID = 1L;
+
+        public Builder(final List<AnyTypeClassTO> anyTypeClassTOs, final String type, final PageReference pageRef) {
+            super(anyTypeClassTOs, new UserRestClient(), type, pageRef);
+            setShowResultPage(true);
+        }
+
+        @Override
+        protected WizardMgtPanel<AnyHandler<UserTO>> newInstance(final String id) {
+            return new UserDirectoryPanel(id, this);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3e8912c3/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java
deleted file mode 100644
index 3a6596d..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/UserSearchResultPanel.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.panels;
-
-import java.io.Serializable;
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-import org.apache.commons.lang3.SerializationUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.syncope.client.console.SyncopeConsoleSession;
-import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.rest.UserRestClient;
-import org.apache.syncope.client.console.status.StatusModal;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AttrColumn;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.TokenColumn;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
-import org.apache.syncope.client.console.wizards.AjaxWizard;
-import org.apache.syncope.client.console.wizards.WizardMgtPanel;
-import org.apache.syncope.client.console.wizards.any.AnyHandler;
-import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.to.AnyTypeClassTO;
-import org.apache.syncope.common.lib.to.UserTO;
-import org.apache.syncope.common.lib.types.SchemaType;
-import org.apache.syncope.common.lib.types.StandardEntitlement;
-import org.apache.wicket.PageReference;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.event.Broadcast;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
-import org.apache.wicket.model.CompoundPropertyModel;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.Model;
-import org.apache.wicket.model.ResourceModel;
-import org.springframework.util.ReflectionUtils;
-
-public class UserSearchResultPanel extends AnySearchResultPanel<UserTO> {
-
-    private static final long serialVersionUID = -1100228004207271270L;
-
-    protected UserSearchResultPanel(final String id, final Builder builder) {
-        super(id, builder);
-    }
-
-    @Override
-    protected String paginatorRowsKey() {
-        return Constants.PREF_USERS_PAGINATOR_ROWS;
-    }
-
-    @Override
-    protected Collection<ActionLink.ActionType> getBulkActions() {
-        final List<ActionLink.ActionType> bulkActions = new ArrayList<>();
-
-        bulkActions.add(ActionLink.ActionType.MUSTCHANGEPASSWORD);
-        bulkActions.add(ActionLink.ActionType.DELETE);
-        bulkActions.add(ActionLink.ActionType.SUSPEND);
-        bulkActions.add(ActionLink.ActionType.REACTIVATE);
-
-        return bulkActions;
-    }
-
-    @Override
-    protected List<IColumn<UserTO, String>> getColumns() {
-        final List<IColumn<UserTO, String>> columns = new ArrayList<>();
-
-        for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_DETAILS_VIEW)) {
-            final Field field = ReflectionUtils.findField(UserTO.class, name);
-
-            if ("token".equalsIgnoreCase(name)) {
-                columns.add(new TokenColumn<UserTO>(new ResourceModel(name, name), name));
-            } else if (field != null
-                    && (field.getType().equals(Boolean.class) || field.getType().equals(boolean.class))) {
-
-                columns.add(new BooleanPropertyColumn<UserTO>(new ResourceModel(name, name), name, name));
-            } else if (field != null && field.getType().equals(Date.class)) {
-                columns.add(new DatePropertyColumn<UserTO>(new ResourceModel(name, name), name, name));
-            } else {
-                columns.add(new PropertyColumn<UserTO, String>(new ResourceModel(name, name), name, name));
-            }
-        }
-
-        for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_PLAIN_ATTRS_VIEW)) {
-            if (pSchemaNames.contains(name)) {
-                columns.add(new AttrColumn<UserTO>(name, SchemaType.PLAIN));
-            }
-        }
-
-        for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_DER_ATTRS_VIEW)) {
-            if (dSchemaNames.contains(name)) {
-                columns.add(new AttrColumn<UserTO>(name, SchemaType.DERIVED));
-            }
-        }
-
-        // Add defaults in case of no selection
-        if (columns.isEmpty()) {
-            for (String name : UserDisplayAttributesModalPanel.DEFAULT_SELECTION) {
-                columns.add(new PropertyColumn<UserTO, String>(new ResourceModel(name, name), name, name));
-            }
-
-            prefMan.setList(getRequest(), getResponse(), Constants.PREF_USERS_DETAILS_VIEW,
-                    Arrays.asList(UserDisplayAttributesModalPanel.DEFAULT_SELECTION));
-        }
-
-        setWindowClosedReloadCallback(displayAttributeModal);
-
-        columns.add(new ActionColumn<UserTO, String>(new ResourceModel("actions")) {
-
-            private static final long serialVersionUID = -3503023501954863131L;
-
-            @Override
-            public ActionLinksPanel<UserTO> getActions(final String componentId, final IModel<UserTO> model) {
-                final ActionLinksPanel.Builder<UserTO> panel = ActionLinksPanel.builder();
-
-                panel.add(new ActionLink<UserTO>() {
-
-                    private static final long serialVersionUID = -7978723352517770644L;
-
-                    @Override
-                    public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
-                        try {
-                            UserRestClient.class.cast(restClient).
-                                    mustChangePassword(model.getObject().getETagValue(), model.getObject().getKey());
-                            info(getString(Constants.OPERATION_SUCCEEDED));
-                            target.add(container);
-                        } catch (SyncopeClientException e) {
-                            LOG.error("While deleting object {}", model.getObject().getKey(), e);
-                            error(StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage());
-                        }
-                        SyncopeConsoleSession.get().getNotificationPanel().refresh(target);
-                    }
-                }, ActionLink.ActionType.MUSTCHANGEPASSWORD, StandardEntitlement.USER_UPDATE).add(
-                        new ActionLink<UserTO>() {
-
-                    private static final long serialVersionUID = -7978723352517770644L;
-
-                    @Override
-                    public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
-
-                        final IModel<AnyHandler<UserTO>> formModel =
-                                new CompoundPropertyModel<>(new AnyHandler<>(model.getObject()));
-                        altDefaultModal.setFormModel(formModel);
-
-                        target.add(altDefaultModal.setContent(new StatusModal<>(
-                                altDefaultModal, pageRef, formModel.getObject().getInnerObject(), false)));
-
-                        altDefaultModal.header(new Model<>(
-                                getString("any.edit", new Model<>(new AnyHandler<>(model.getObject())))));
-
-                        altDefaultModal.show(true);
-                    }
-                }, ActionLink.ActionType.MANAGE_RESOURCES, StandardEntitlement.USER_READ).add(
-                                new ActionLink<UserTO>() {
-
-                            private static final long serialVersionUID = -7978723352517770644L;
-
-                            @Override
-                            public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
-                                final IModel<AnyHandler<UserTO>> formModel = new CompoundPropertyModel<>(
-                                        new AnyHandler<>(model.
-                                                getObject()));
-                                altDefaultModal.setFormModel(formModel);
-
-                                target.add(altDefaultModal.setContent(new StatusModal<>(
-                                        altDefaultModal, pageRef, formModel.getObject().getInnerObject(), true)));
-
-                                altDefaultModal.header(new Model<>(
-                                        getString("any.edit", new Model<>(new AnyHandler<>(model.getObject())))));
-
-                                altDefaultModal.show(true);
-                            }
-                        }, ActionLink.ActionType.ENABLE, StandardEntitlement.USER_READ).add(new ActionLink<UserTO>() {
-
-                            private static final long serialVersionUID = -7978723352517770644L;
-
-                            @Override
-                            public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
-                                send(UserSearchResultPanel.this, Broadcast.EXACT,
-                                        new AjaxWizard.EditItemActionEvent<>(
-                                                new AnyHandler<>(new UserRestClient().read(model.getObject().getKey())),
-                                                target));
-                            }
-                        }, ActionLink.ActionType.EDIT, StandardEntitlement.USER_READ).add(new ActionLink<UserTO>() {
-
-                    private static final long serialVersionUID = -7978723352517770644L;
-
-                    @Override
-                    public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
-                        final UserTO clone = SerializationUtils.clone(model.getObject());
-                        clone.setKey(0L);
-                        send(UserSearchResultPanel.this, Broadcast.EXACT,
-                                new AjaxWizard.NewItemActionEvent<>(new AnyHandler<>(clone), target));
-                    }
-                }, ActionLink.ActionType.CLONE, StandardEntitlement.USER_CREATE).add(new ActionLink<UserTO>() {
-
-                    private static final long serialVersionUID = -7978723352517770644L;
-
-                    @Override
-                    public void onClick(final AjaxRequestTarget target, final UserTO ignore) {
-                        try {
-                            restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
-                            info(getString(Constants.OPERATION_SUCCEEDED));
-                            target.add(container);
-                        } catch (SyncopeClientException e) {
-                            LOG.error("While deleting object {}", model.getObject().getKey(), e);
-                            error(StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage());
-                        }
-                        SyncopeConsoleSession.get().getNotificationPanel().refresh(target);
-                    }
-                }, ActionLink.ActionType.DELETE, StandardEntitlement.USER_DELETE);
-
-                return panel.build(componentId, model.getObject());
-            }
-
-            @Override
-            public ActionLinksPanel<Serializable> getHeader(final String componentId) {
-                final ActionLinksPanel.Builder<Serializable> panel = ActionLinksPanel.builder();
-
-                return panel.add(new ActionLink<Serializable>() {
-
-                    private static final long serialVersionUID = -7978723352517770644L;
-
-                    @Override
-                    public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
-                        target.add(displayAttributeModal.setContent(new UserDisplayAttributesModalPanel<>(
-                                displayAttributeModal, page.getPageReference(), pSchemaNames, dSchemaNames)));
-
-                        displayAttributeModal.header(new ResourceModel("any.attr.display"));
-                        displayAttributeModal.addSumbitButton();
-                        displayAttributeModal.show(true);
-                    }
-                }, ActionLink.ActionType.CHANGE_VIEW, StandardEntitlement.USER_READ).add(
-                        new ActionLink<Serializable>() {
-
-                    private static final long serialVersionUID = -7978723352517770644L;
-
-                    @Override
-                    public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
-                        if (target != null) {
-                            target.add(container);
-                        }
-                    }
-                }, ActionLink.ActionType.RELOAD, StandardEntitlement.USER_SEARCH).build(componentId);
-            }
-        });
-
-        return columns;
-    }
-
-    public static class Builder extends AnySearchResultPanel.Builder<UserTO> {
-
-        private static final long serialVersionUID = 1L;
-
-        public Builder(final List<AnyTypeClassTO> anyTypeClassTOs, final String type, final PageReference pageRef) {
-            super(anyTypeClassTOs, new UserRestClient(), type, pageRef);
-            setShowResultPage(true);
-        }
-
-        @Override
-        protected WizardMgtPanel<AnyHandler<UserTO>> newInstance(final String id) {
-            return new UserSearchResultPanel(id, this);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3e8912c3/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnyObjectSelectionDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnyObjectSelectionDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnyObjectSelectionDirectoryPanel.java
new file mode 100644
index 0000000..2bd34b7
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnyObjectSelectionDirectoryPanel.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.panels.search;
+
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.AnyObjectDisplayAttributesModalPanel;
+import org.apache.syncope.client.console.rest.AnyObjectRestClient;
+import org.apache.syncope.client.console.wizards.WizardMgtPanel;
+import org.apache.syncope.client.console.wizards.any.AnyHandler;
+import org.apache.syncope.common.lib.to.AnyObjectTO;
+import org.apache.syncope.common.lib.to.AnyTypeClassTO;
+import org.apache.wicket.PageReference;
+
+public final class AnyObjectSelectionDirectoryPanel extends AnySelectionDirectoryPanel<AnyObjectTO> {
+
+    private static final long serialVersionUID = -1100228004207271272L;
+
+    private AnyObjectSelectionDirectoryPanel(final String id, final Builder builder) {
+        super(id, builder, AnyObjectTO.class);
+    }
+
+    @Override
+    protected String paginatorRowsKey() {
+        return Constants.PREF_ANYOBJECT_PAGINATOR_ROWS;
+    }
+
+    @Override
+    protected String[] getDisplayAttributes() {
+        return AnyObjectDisplayAttributesModalPanel.DEFAULT_SELECTION;
+    }
+
+    @Override
+    public String getPrefDetailsView() {
+        return String.format(Constants.PREF_ANY_OBJECT_DETAILS_VIEW, type);
+    }
+
+    @Override
+    public String getPrefPlainAttributesView() {
+        return String.format(Constants.PREF_ANY_OBJECT_PLAIN_ATTRS_VIEW, type);
+    }
+
+    @Override
+    public String getPrefDerivedAttributesView() {
+        return String.format(Constants.PREF_ANY_OBJECT_DER_ATTRS_VIEW, type);
+    }
+
+    public static final class Builder extends AnySelectionDirectoryPanel.Builder<AnyObjectTO> {
+
+        private static final long serialVersionUID = 5155811461060452446L;
+
+        public Builder(final List<AnyTypeClassTO> anyTypeClassTOs, final String type, final PageReference pageRef) {
+            super(anyTypeClassTOs, new AnyObjectRestClient(), type, pageRef);
+            this.filtered = true;
+            this.checkBoxEnabled = false;
+        }
+
+        @Override
+        protected WizardMgtPanel<AnyHandler<AnyObjectTO>> newInstance(final String id) {
+            return new AnyObjectSelectionDirectoryPanel(id, this);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3e8912c3/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnyObjectSelectionSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnyObjectSelectionSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnyObjectSelectionSearchResultPanel.java
deleted file mode 100644
index 9b37287..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnyObjectSelectionSearchResultPanel.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.panels.search;
-
-import java.util.List;
-import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.panels.AnyObjectDisplayAttributesModalPanel;
-import org.apache.syncope.client.console.rest.AnyObjectRestClient;
-import org.apache.syncope.client.console.wizards.WizardMgtPanel;
-import org.apache.syncope.client.console.wizards.any.AnyHandler;
-import org.apache.syncope.common.lib.to.AnyObjectTO;
-import org.apache.syncope.common.lib.to.AnyTypeClassTO;
-import org.apache.wicket.PageReference;
-
-public final class AnyObjectSelectionSearchResultPanel extends AnySelectionSearchResultPanel<AnyObjectTO> {
-
-    private static final long serialVersionUID = -1100228004207271272L;
-
-    private AnyObjectSelectionSearchResultPanel(final String id, final Builder builder) {
-        super(id, builder, AnyObjectTO.class);
-    }
-
-    @Override
-    protected String paginatorRowsKey() {
-        return Constants.PREF_ANYOBJECT_PAGINATOR_ROWS;
-    }
-
-    @Override
-    protected String[] getDisplayAttributes() {
-        return AnyObjectDisplayAttributesModalPanel.DEFAULT_SELECTION;
-    }
-
-    @Override
-    public String getPrefDetailsView() {
-        return String.format(Constants.PREF_ANY_OBJECT_DETAILS_VIEW, type);
-    }
-
-    @Override
-    public String getPrefPlainAttributesView() {
-        return String.format(Constants.PREF_ANY_OBJECT_PLAIN_ATTRS_VIEW, type);
-    }
-
-    @Override
-    public String getPrefDerivedAttributesView() {
-        return String.format(Constants.PREF_ANY_OBJECT_DER_ATTRS_VIEW, type);
-    }
-
-    public static final class Builder extends AnySelectionSearchResultPanel.Builder<AnyObjectTO> {
-
-        private static final long serialVersionUID = 5155811461060452446L;
-
-        public Builder(final List<AnyTypeClassTO> anyTypeClassTOs, final String type, final PageReference pageRef) {
-            super(anyTypeClassTOs, new AnyObjectRestClient(), type, pageRef);
-            this.filtered = true;
-            this.checkBoxEnabled = false;
-        }
-
-        @Override
-        protected WizardMgtPanel<AnyHandler<AnyObjectTO>> newInstance(final String id) {
-            return new AnyObjectSelectionSearchResultPanel(id, this);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3e8912c3/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionDirectoryPanel.java
new file mode 100644
index 0000000..56c6109
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionDirectoryPanel.java
@@ -0,0 +1,218 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.panels.search;
+
+import java.io.Serializable;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+import org.apache.syncope.client.console.panels.AnyObjectDisplayAttributesModalPanel;
+import org.apache.syncope.client.console.panels.AnyDirectoryPanel;
+import org.apache.syncope.client.console.rest.AbstractAnyRestClient;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AttrColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
+import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.TokenColumn;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
+import org.apache.syncope.common.lib.to.AnyTypeClassTO;
+import org.apache.syncope.common.lib.to.AnyObjectTO;
+import org.apache.syncope.common.lib.to.AnyTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.AnyEntitlement;
+import org.apache.syncope.common.lib.types.SchemaType;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.event.Broadcast;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.ResourceModel;
+import org.springframework.util.ReflectionUtils;
+
+public abstract class AnySelectionDirectoryPanel<T extends AnyTO> extends AnyDirectoryPanel<T> {
+
+    private static final long serialVersionUID = -1100228004207271272L;
+
+    private final Class<T> reference;
+
+    protected AnySelectionDirectoryPanel(
+            final String id, final AnyDirectoryPanel.Builder<T> builder, final Class<T> reference) {
+
+        super(id, builder);
+        this.reference = reference;
+    }
+
+    @Override
+    protected List<IColumn<T, String>> getColumns() {
+        final List<IColumn<T, String>> columns = new ArrayList<>();
+
+        for (String name : prefMan.getList(getRequest(), getPrefDetailsView())) {
+            final Field field = ReflectionUtils.findField(AnyObjectTO.class, name);
+
+            if (reference == UserTO.class && "token".equalsIgnoreCase(name)) {
+                columns.add(new TokenColumn<T>(new ResourceModel(name, name), name));
+            } else if (field != null
+                    && (field.getType().equals(Boolean.class) || field.getType().equals(boolean.class))) {
+
+                columns.add(new BooleanPropertyColumn<T>(new ResourceModel(name, name), name, name));
+            } else if (field != null && field.getType().equals(Date.class)) {
+                columns.add(new DatePropertyColumn<T>(new ResourceModel(name, name), name, name));
+            } else {
+                columns.add(new PropertyColumn<T, String>(new ResourceModel(name, name), name, name));
+            }
+        }
+
+        for (String name : prefMan.getList(getRequest(), getPrefPlainAttributesView())) {
+            if (pSchemaNames.contains(name)) {
+                columns.add(new AttrColumn<T>(name, SchemaType.PLAIN));
+            }
+        }
+
+        for (String name : prefMan.getList(getRequest(), getPrefDerivedAttributesView())) {
+            if (dSchemaNames.contains(name)) {
+                columns.add(new AttrColumn<T>(name, SchemaType.DERIVED));
+            }
+        }
+
+        // Add defaults in case of no selection
+        if (columns.isEmpty()) {
+            for (String name : getDisplayAttributes()) {
+                columns.add(new PropertyColumn<T, String>(new ResourceModel(name, name), name, name));
+            }
+
+            prefMan.setList(getRequest(), getResponse(), getPrefDetailsView(), Arrays.asList(getDisplayAttributes()));
+        }
+
+        columns.add(new ActionColumn<T, String>(new ResourceModel("actions")) {
+
+            private static final long serialVersionUID = -3503023501954863131L;
+
+            @Override
+            public ActionLinksPanel<T> getActions(final String componentId, final IModel<T> model) {
+                final ActionLinksPanel.Builder<T> panel = ActionLinksPanel.builder();
+
+                panel.add(new ActionLink<T>() {
+
+                    private static final long serialVersionUID = -7978723352517770644L;
+
+                    @Override
+                    public void onClick(final AjaxRequestTarget target, final T ignore) {
+                        send(AnySelectionDirectoryPanel.this,
+                                Broadcast.BUBBLE, new ItemSelection<>(target, model.getObject()));
+                    }
+                }, ActionLink.ActionType.SELECT, String.format("%s_%s", type, AnyEntitlement.READ));
+
+                return panel.build(componentId, model.getObject());
+            }
+
+            @Override
+            public ActionLinksPanel<T> getHeader(final String componentId) {
+                final ActionLinksPanel.Builder<T> panel = ActionLinksPanel.builder();
+
+                return panel.
+                        add(new ActionLink<T>() {
+
+                            private static final long serialVersionUID = -7978723352517770644L;
+
+                            @Override
+                            public void onClick(final AjaxRequestTarget target, final T ignore) {
+                                // still missing content
+                                target.add(altDefaultModal.setContent(new AnyObjectDisplayAttributesModalPanel<>(
+                                        altDefaultModal, page.getPageReference(), pSchemaNames, dSchemaNames, type)));
+
+                                altDefaultModal.addSumbitButton();
+                                altDefaultModal.header(new ResourceModel("any.attr.display"));
+                                altDefaultModal.show(true);
+                            }
+                        }, ActionLink.ActionType.CHANGE_VIEW, String.format("%s_%s", type, AnyEntitlement.READ)).
+                        add(new ActionLink<T>() {
+
+                            private static final long serialVersionUID = -7978723352517770644L;
+
+                            @Override
+                            public void onClick(final AjaxRequestTarget target, final T ignore) {
+                                if (target != null) {
+                                    target.add(container);
+                                }
+                            }
+                        }, ActionLink.ActionType.RELOAD, String.format("%s_%s", type, AnyEntitlement.SEARCH)).
+                        build(componentId);
+            }
+        });
+
+        return columns;
+    }
+
+    @Override
+    protected Collection<ActionLink.ActionType> getBulkActions() {
+        return Collections.<ActionLink.ActionType>emptyList();
+    }
+
+    protected abstract String[] getDisplayAttributes();
+
+    protected abstract String getPrefDetailsView();
+
+    protected abstract String getPrefPlainAttributesView();
+
+    protected abstract String getPrefDerivedAttributesView();
+
+    public abstract static class Builder<T extends AnyTO> extends AnyDirectoryPanel.Builder<T> {
+
+        private static final long serialVersionUID = 5460024856989891156L;
+
+        public Builder(
+                final List<AnyTypeClassTO> anyTypeClassTOs,
+                final AbstractAnyRestClient<T> restClient,
+                final String type,
+                final PageReference pageRef) {
+
+            super(anyTypeClassTOs, restClient, type, pageRef);
+            this.filtered = true;
+            this.checkBoxEnabled = false;
+        }
+    }
+
+    public static class ItemSelection<T extends AnyTO> implements Serializable {
+
+        private static final long serialVersionUID = 1242677935378149180L;
+
+        private final AjaxRequestTarget target;
+
+        private final T usr;
+
+        public ItemSelection(final AjaxRequestTarget target, final T usr) {
+            this.target = target;
+            this.usr = usr;
+        }
+
+        public AjaxRequestTarget getTarget() {
+            return target;
+        }
+
+        public T getSelection() {
+            return usr;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3e8912c3/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionSearchResultPanel.java
deleted file mode 100644
index 344ff17..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/AnySelectionSearchResultPanel.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.panels.search;
-
-import java.io.Serializable;
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-import org.apache.syncope.client.console.panels.AnyObjectDisplayAttributesModalPanel;
-import org.apache.syncope.client.console.panels.AnySearchResultPanel;
-import org.apache.syncope.client.console.rest.AbstractAnyRestClient;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.AttrColumn;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.BooleanPropertyColumn;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
-import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.TokenColumn;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink;
-import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel;
-import org.apache.syncope.common.lib.to.AnyTypeClassTO;
-import org.apache.syncope.common.lib.to.AnyObjectTO;
-import org.apache.syncope.common.lib.to.AnyTO;
-import org.apache.syncope.common.lib.to.UserTO;
-import org.apache.syncope.common.lib.types.AnyEntitlement;
-import org.apache.syncope.common.lib.types.SchemaType;
-import org.apache.wicket.PageReference;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.event.Broadcast;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.ResourceModel;
-import org.springframework.util.ReflectionUtils;
-
-public abstract class AnySelectionSearchResultPanel<T extends AnyTO> extends AnySearchResultPanel<T> {
-
-    private static final long serialVersionUID = -1100228004207271272L;
-
-    private final Class<T> reference;
-
-    protected AnySelectionSearchResultPanel(
-            final String id, final AnySearchResultPanel.Builder<T> builder, final Class<T> reference) {
-
-        super(id, builder);
-        this.reference = reference;
-    }
-
-    @Override
-    protected List<IColumn<T, String>> getColumns() {
-        final List<IColumn<T, String>> columns = new ArrayList<>();
-
-        for (String name : prefMan.getList(getRequest(), getPrefDetailsView())) {
-            final Field field = ReflectionUtils.findField(AnyObjectTO.class, name);
-
-            if (reference == UserTO.class && "token".equalsIgnoreCase(name)) {
-                columns.add(new TokenColumn<T>(new ResourceModel(name, name), name));
-            } else if (field != null
-                    && (field.getType().equals(Boolean.class) || field.getType().equals(boolean.class))) {
-
-                columns.add(new BooleanPropertyColumn<T>(new ResourceModel(name, name), name, name));
-            } else if (field != null && field.getType().equals(Date.class)) {
-                columns.add(new DatePropertyColumn<T>(new ResourceModel(name, name), name, name));
-            } else {
-                columns.add(new PropertyColumn<T, String>(new ResourceModel(name, name), name, name));
-            }
-        }
-
-        for (String name : prefMan.getList(getRequest(), getPrefPlainAttributesView())) {
-            if (pSchemaNames.contains(name)) {
-                columns.add(new AttrColumn<T>(name, SchemaType.PLAIN));
-            }
-        }
-
-        for (String name : prefMan.getList(getRequest(), getPrefDerivedAttributesView())) {
-            if (dSchemaNames.contains(name)) {
-                columns.add(new AttrColumn<T>(name, SchemaType.DERIVED));
-            }
-        }
-
-        // Add defaults in case of no selection
-        if (columns.isEmpty()) {
-            for (String name : getDisplayAttributes()) {
-                columns.add(new PropertyColumn<T, String>(new ResourceModel(name, name), name, name));
-            }
-
-            prefMan.setList(getRequest(), getResponse(), getPrefDetailsView(), Arrays.asList(getDisplayAttributes()));
-        }
-
-        columns.add(new ActionColumn<T, String>(new ResourceModel("actions")) {
-
-            private static final long serialVersionUID = -3503023501954863131L;
-
-            @Override
-            public ActionLinksPanel<T> getActions(final String componentId, final IModel<T> model) {
-                final ActionLinksPanel.Builder<T> panel = ActionLinksPanel.builder();
-
-                panel.add(new ActionLink<T>() {
-
-                    private static final long serialVersionUID = -7978723352517770644L;
-
-                    @Override
-                    public void onClick(final AjaxRequestTarget target, final T ignore) {
-                        send(AnySelectionSearchResultPanel.this,
-                                Broadcast.BUBBLE, new ItemSelection<>(target, model.getObject()));
-                    }
-                }, ActionLink.ActionType.SELECT, String.format("%s_%s", type, AnyEntitlement.READ));
-
-                return panel.build(componentId, model.getObject());
-            }
-
-            @Override
-            public ActionLinksPanel<T> getHeader(final String componentId) {
-                final ActionLinksPanel.Builder<T> panel = ActionLinksPanel.builder();
-
-                return panel.
-                        add(new ActionLink<T>() {
-
-                            private static final long serialVersionUID = -7978723352517770644L;
-
-                            @Override
-                            public void onClick(final AjaxRequestTarget target, final T ignore) {
-                                // still missing content
-                                target.add(altDefaultModal.setContent(new AnyObjectDisplayAttributesModalPanel<>(
-                                        altDefaultModal, page.getPageReference(), pSchemaNames, dSchemaNames, type)));
-
-                                altDefaultModal.addSumbitButton();
-                                altDefaultModal.header(new ResourceModel("any.attr.display"));
-                                altDefaultModal.show(true);
-                            }
-                        }, ActionLink.ActionType.CHANGE_VIEW, String.format("%s_%s", type, AnyEntitlement.READ)).
-                        add(new ActionLink<T>() {
-
-                            private static final long serialVersionUID = -7978723352517770644L;
-
-                            @Override
-                            public void onClick(final AjaxRequestTarget target, final T ignore) {
-                                if (target != null) {
-                                    target.add(container);
-                                }
-                            }
-                        }, ActionLink.ActionType.RELOAD, String.format("%s_%s", type, AnyEntitlement.SEARCH)).
-                        build(componentId);
-            }
-        });
-
-        return columns;
-    }
-
-    @Override
-    protected Collection<ActionLink.ActionType> getBulkActions() {
-        return Collections.<ActionLink.ActionType>emptyList();
-    }
-
-    protected abstract String[] getDisplayAttributes();
-
-    protected abstract String getPrefDetailsView();
-
-    protected abstract String getPrefPlainAttributesView();
-
-    protected abstract String getPrefDerivedAttributesView();
-
-    public abstract static class Builder<T extends AnyTO> extends AnySearchResultPanel.Builder<T> {
-
-        private static final long serialVersionUID = 5460024856989891156L;
-
-        public Builder(
-                final List<AnyTypeClassTO> anyTypeClassTOs,
-                final AbstractAnyRestClient<T> restClient,
-                final String type,
-                final PageReference pageRef) {
-
-            super(anyTypeClassTOs, restClient, type, pageRef);
-            this.filtered = true;
-            this.checkBoxEnabled = false;
-        }
-    }
-
-    public static class ItemSelection<T extends AnyTO> implements Serializable {
-
-        private static final long serialVersionUID = 1242677935378149180L;
-
-        private final AjaxRequestTarget target;
-
-        private final T usr;
-
-        public ItemSelection(final AjaxRequestTarget target, final T usr) {
-            this.target = target;
-            this.usr = usr;
-        }
-
-        public AjaxRequestTarget getTarget() {
-            return target;
-        }
-
-        public T getSelection() {
-            return usr;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3e8912c3/client/console/src/main/java/org/apache/syncope/client/console/panels/search/GroupSelectionDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/GroupSelectionDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/GroupSelectionDirectoryPanel.java
new file mode 100644
index 0000000..6e99769
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/GroupSelectionDirectoryPanel.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.panels.search;
+
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.GroupDisplayAttributesModalPanel;
+import org.apache.syncope.client.console.rest.GroupRestClient;
+import org.apache.syncope.client.console.wizards.WizardMgtPanel;
+import org.apache.syncope.client.console.wizards.any.AnyHandler;
+import org.apache.syncope.common.lib.to.AnyTypeClassTO;
+import org.apache.syncope.common.lib.to.GroupTO;
+import org.apache.wicket.PageReference;
+
+public final class GroupSelectionDirectoryPanel extends AnySelectionDirectoryPanel<GroupTO> {
+
+    private static final long serialVersionUID = -1100228004207271271L;
+
+    private GroupSelectionDirectoryPanel(final String id, final Builder builder) {
+        super(id, builder, GroupTO.class);
+    }
+
+    @Override
+    protected String paginatorRowsKey() {
+        return Constants.PREF_GROUP_PAGINATOR_ROWS;
+    }
+
+    @Override
+    protected String[] getDisplayAttributes() {
+        return GroupDisplayAttributesModalPanel.DEFAULT_SELECTION;
+    }
+
+    @Override
+    public String getPrefDetailsView() {
+        return Constants.PREF_GROUP_DETAILS_VIEW;
+    }
+
+    @Override
+    public String getPrefPlainAttributesView() {
+        return Constants.PREF_GROUP_PLAIN_ATTRS_VIEW;
+    }
+
+    @Override
+    public String getPrefDerivedAttributesView() {
+        return Constants.PREF_GROUP_DER_ATTRS_VIEW;
+    }
+
+    public static final class Builder extends AnySelectionDirectoryPanel.Builder<GroupTO> {
+
+        private static final long serialVersionUID = -8774023867045850683L;
+
+        public Builder(final List<AnyTypeClassTO> anyTypeClassTOs, final String type, final PageReference pageRef) {
+            super(anyTypeClassTOs, new GroupRestClient(), type, pageRef);
+            this.filtered = true;
+            this.checkBoxEnabled = false;
+        }
+
+        @Override
+        protected WizardMgtPanel<AnyHandler<GroupTO>> newInstance(final String id) {
+            return new GroupSelectionDirectoryPanel(id, this);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3e8912c3/client/console/src/main/java/org/apache/syncope/client/console/panels/search/GroupSelectionSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/GroupSelectionSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/GroupSelectionSearchResultPanel.java
deleted file mode 100644
index 5af0851..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/GroupSelectionSearchResultPanel.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.panels.search;
-
-import java.util.List;
-import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.panels.GroupDisplayAttributesModalPanel;
-import org.apache.syncope.client.console.rest.GroupRestClient;
-import org.apache.syncope.client.console.wizards.WizardMgtPanel;
-import org.apache.syncope.client.console.wizards.any.AnyHandler;
-import org.apache.syncope.common.lib.to.AnyTypeClassTO;
-import org.apache.syncope.common.lib.to.GroupTO;
-import org.apache.wicket.PageReference;
-
-public final class GroupSelectionSearchResultPanel extends AnySelectionSearchResultPanel<GroupTO> {
-
-    private static final long serialVersionUID = -1100228004207271271L;
-
-    private GroupSelectionSearchResultPanel(final String id, final Builder builder) {
-        super(id, builder, GroupTO.class);
-    }
-
-    @Override
-    protected String paginatorRowsKey() {
-        return Constants.PREF_GROUP_PAGINATOR_ROWS;
-    }
-
-    @Override
-    protected String[] getDisplayAttributes() {
-        return GroupDisplayAttributesModalPanel.DEFAULT_SELECTION;
-    }
-
-    @Override
-    public String getPrefDetailsView() {
-        return Constants.PREF_GROUP_DETAILS_VIEW;
-    }
-
-    @Override
-    public String getPrefPlainAttributesView() {
-        return Constants.PREF_GROUP_PLAIN_ATTRS_VIEW;
-    }
-
-    @Override
-    public String getPrefDerivedAttributesView() {
-        return Constants.PREF_GROUP_DER_ATTRS_VIEW;
-    }
-
-    public static final class Builder extends AnySelectionSearchResultPanel.Builder<GroupTO> {
-
-        private static final long serialVersionUID = -8774023867045850683L;
-
-        public Builder(final List<AnyTypeClassTO> anyTypeClassTOs, final String type, final PageReference pageRef) {
-            super(anyTypeClassTOs, new GroupRestClient(), type, pageRef);
-            this.filtered = true;
-            this.checkBoxEnabled = false;
-        }
-
-        @Override
-        protected WizardMgtPanel<AnyHandler<GroupTO>> newInstance(final String id) {
-            return new GroupSelectionSearchResultPanel(id, this);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3e8912c3/client/console/src/main/java/org/apache/syncope/client/console/panels/search/UserSelectionDirectoryPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/UserSelectionDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/UserSelectionDirectoryPanel.java
new file mode 100644
index 0000000..28e3565
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/UserSelectionDirectoryPanel.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.client.console.panels.search;
+
+import java.util.List;
+import org.apache.syncope.client.console.commons.Constants;
+import org.apache.syncope.client.console.panels.UserDisplayAttributesModalPanel;
+import org.apache.syncope.client.console.rest.UserRestClient;
+import org.apache.syncope.client.console.wizards.WizardMgtPanel;
+import org.apache.syncope.client.console.wizards.any.AnyHandler;
+import org.apache.syncope.common.lib.to.AnyTypeClassTO;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.wicket.PageReference;
+
+public final class UserSelectionDirectoryPanel extends AnySelectionDirectoryPanel<UserTO> {
+
+    private static final long serialVersionUID = -1100228004207271272L;
+
+    private UserSelectionDirectoryPanel(final String id, final Builder builder) {
+        super(id, builder, UserTO.class);
+    }
+
+    @Override
+    protected String paginatorRowsKey() {
+        return Constants.PREF_USERS_PAGINATOR_ROWS;
+    }
+
+    @Override
+    protected String[] getDisplayAttributes() {
+        return UserDisplayAttributesModalPanel.DEFAULT_SELECTION;
+    }
+
+    @Override
+    protected String getPrefDetailsView() {
+        return Constants.PREF_USERS_DETAILS_VIEW;
+    }
+
+    @Override
+    protected String getPrefPlainAttributesView() {
+        return Constants.PREF_USERS_PLAIN_ATTRS_VIEW;
+    }
+
+    @Override
+    protected String getPrefDerivedAttributesView() {
+        return Constants.PREF_USERS_DER_ATTRS_VIEW;
+    }
+
+    public static final class Builder extends AnySelectionDirectoryPanel.Builder<UserTO> {
+
+        private static final long serialVersionUID = -1555789797531054422L;
+
+        public Builder(final List<AnyTypeClassTO> anyTypeClassTOs, final String type, final PageReference pageRef) {
+            super(anyTypeClassTOs, new UserRestClient(), type, pageRef);
+            this.filtered = true;
+            this.checkBoxEnabled = false;
+        }
+
+        @Override
+        protected WizardMgtPanel<AnyHandler<UserTO>> newInstance(final String id) {
+            return new UserSelectionDirectoryPanel(id, this);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/3e8912c3/client/console/src/main/java/org/apache/syncope/client/console/panels/search/UserSelectionSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/UserSelectionSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/search/UserSelectionSearchResultPanel.java
deleted file mode 100644
index deb6263..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/search/UserSelectionSearchResultPanel.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.syncope.client.console.panels.search;
-
-import java.util.List;
-import org.apache.syncope.client.console.commons.Constants;
-import org.apache.syncope.client.console.panels.UserDisplayAttributesModalPanel;
-import org.apache.syncope.client.console.rest.UserRestClient;
-import org.apache.syncope.client.console.wizards.WizardMgtPanel;
-import org.apache.syncope.client.console.wizards.any.AnyHandler;
-import org.apache.syncope.common.lib.to.AnyTypeClassTO;
-import org.apache.syncope.common.lib.to.UserTO;
-import org.apache.wicket.PageReference;
-
-public final class UserSelectionSearchResultPanel extends AnySelectionSearchResultPanel<UserTO> {
-
-    private static final long serialVersionUID = -1100228004207271272L;
-
-    private UserSelectionSearchResultPanel(final String id, final Builder builder) {
-        super(id, builder, UserTO.class);
-    }
-
-    @Override
-    protected String paginatorRowsKey() {
-        return Constants.PREF_USERS_PAGINATOR_ROWS;
-    }
-
-    @Override
-    protected String[] getDisplayAttributes() {
-        return UserDisplayAttributesModalPanel.DEFAULT_SELECTION;
-    }
-
-    @Override
-    protected String getPrefDetailsView() {
-        return Constants.PREF_USERS_DETAILS_VIEW;
-    }
-
-    @Override
-    protected String getPrefPlainAttributesView() {
-        return Constants.PREF_USERS_PLAIN_ATTRS_VIEW;
-    }
-
-    @Override
-    protected String getPrefDerivedAttributesView() {
-        return Constants.PREF_USERS_DER_ATTRS_VIEW;
-    }
-
-    public static final class Builder extends AnySelectionSearchResultPanel.Builder<UserTO> {
-
-        private static final long serialVersionUID = -1555789797531054422L;
-
-        public Builder(final List<AnyTypeClassTO> anyTypeClassTOs, final String type, final PageReference pageRef) {
-            super(anyTypeClassTOs, new UserRestClient(), type, pageRef);
-            this.filtered = true;
-            this.checkBoxEnabled = false;
-        }
-
-        @Override
-        protected WizardMgtPanel<AnyHandler<UserTO>> newInstance(final String id) {
-            return new UserSelectionSearchResultPanel(id, this);
-        }
-    }
-}