syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [6/6] syncope git commit: [SYNCOPE-731] Implementation provided
Date Sat, 14 Nov 2015 17:33:11 GMT
[SYNCOPE-731] Implementation provided


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/b9fcf293
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/b9fcf293
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/b9fcf293

Branch: refs/heads/master
Commit: b9fcf293b3fb1df01c81de52ed65d51f25322601
Parents: cf426da
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Sat Nov 14 18:32:51 2015 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Sat Nov 14 18:32:51 2015 +0100

----------------------------------------------------------------------
 .../entitlement/EntitlementResultManager.java   |   9 +-
 .../EntitlementSyncopeOperations.java           |  13 +-
 .../console/SyncopeConsoleApplication.java      |   4 +-
 .../client/console/commons/AnyDataProvider.java |  27 +-
 .../commons/SortableAnyProviderComparator.java  |   6 +-
 .../pages/AnyDisplayAttributesModalPage.java    |   2 +
 .../syncope/client/console/pages/BasePage.java  |  11 +-
 .../syncope/client/console/pages/Realms.java    |  18 +-
 .../syncope/client/console/pages/Schemas.java   |   6 +-
 .../syncope/client/console/pages/Workflow.java  |  22 +-
 .../console/pages/XMLEditorPopupPage.java       |  38 +--
 .../panels/AbstractSearchResultPanel.java       |  26 +-
 .../console/panels/AnySearchResultPanel.java    |  56 ++--
 .../console/panels/GroupSearchResultPanel.java  |  46 ++--
 .../console/panels/ResourceMappingPanel.java    |  14 +-
 .../client/console/panels/ResourceModal.java    |  53 ++--
 .../client/console/panels/SchemasPanel.java     |  47 ++--
 .../console/panels/UserSearchResultPanel.java   |  70 +++--
 .../console/rest/AbstractAnyRestClient.java     |  11 +-
 .../console/rest/AnyObjectRestClient.java       |   8 +-
 .../client/console/rest/GroupRestClient.java    |   2 +-
 .../client/console/rest/UserRestClient.java     |   2 +-
 .../client/console/topology/Topology.java       | 122 ++++-----
 .../console/topology/TopologyNodePanel.java     |  22 +-
 .../html/repeater/data/table/AttrColumn.java    |  15 +-
 .../markup/html/form/ActionLinksPanel.java      |  46 ++--
 .../markup/html/form/AjaxDateFieldPanel.java    |   1 +
 .../apache/syncope/common/lib/to/SyncopeTO.java |   9 +
 .../common/lib/types/ClientExceptionType.java   |   1 +
 .../syncope/common/lib/types/Entitlement.java   | 264 -------------------
 .../common/lib/types/StandardEntitlement.java   | 246 +++++++++++++++++
 .../rest/api/service/AnyObjectService.java      |   3 +-
 .../syncope/core/logic/AnyObjectLogic.java      | 125 ++++-----
 .../syncope/core/logic/AnyTypeClassLogic.java   |   8 +-
 .../apache/syncope/core/logic/AnyTypeLogic.java |  20 +-
 .../syncope/core/logic/ConfigurationLogic.java  |  10 +-
 .../syncope/core/logic/ConnectorLogic.java      |  48 ++--
 .../apache/syncope/core/logic/DomainLogic.java  |  10 +-
 .../apache/syncope/core/logic/GroupLogic.java   |  70 ++---
 .../apache/syncope/core/logic/LoggerLogic.java  |  43 +--
 .../syncope/core/logic/NotificationLogic.java   |  12 +-
 .../apache/syncope/core/logic/PolicyLogic.java  |  16 +-
 .../apache/syncope/core/logic/RealmLogic.java   |  10 +-
 .../core/logic/RelationshipTypeLogic.java       |  22 +-
 .../apache/syncope/core/logic/ReportLogic.java  |  26 +-
 .../syncope/core/logic/ResourceLogic.java       |  16 +-
 .../apache/syncope/core/logic/RoleLogic.java    |  12 +-
 .../apache/syncope/core/logic/SchemaLogic.java  |  38 +--
 .../core/logic/SecurityQuestionLogic.java       |  10 +-
 .../apache/syncope/core/logic/SyncopeLogic.java |   3 +
 .../apache/syncope/core/logic/TaskLogic.java    |  26 +-
 .../apache/syncope/core/logic/UserLogic.java    |  88 +++----
 .../syncope/core/logic/UserWorkflowLogic.java   |  16 +-
 .../syncope/core/logic/WorkflowLogic.java       |  20 +-
 .../core/logic/init/EntitlementAccessor.java    |  45 ++++
 .../core/logic/init/EntitlementLoader.java      |  60 +++++
 .../syncope/core/misc/EntitlementsHolder.java   |  80 ++++++
 .../core/misc/security/AuthContextUtils.java    |  14 +-
 .../core/misc/security/AuthDataAccessor.java    |  15 +-
 .../misc/security/MustChangePasswordFilter.java |  12 +-
 .../syncope/core/misc/utils/RealmUtils.java     |   6 +-
 .../core/persistence/api/dao/AnyObjectDAO.java  |   8 -
 .../persistence/api/dao/search/SearchCond.java  |  31 +++
 .../core/persistence/api/entity/Role.java       |   4 +-
 .../persistence/jpa/dao/JPAAnyObjectDAO.java    |  27 +-
 .../core/persistence/jpa/dao/JPAGroupDAO.java   |   4 +-
 .../core/persistence/jpa/dao/JPAUserDAO.java    |   4 +-
 .../core/persistence/jpa/entity/JPARole.java    |   4 +-
 .../persistence/jpa/inner/AnyObjectTest.java    |  10 -
 .../persistence/jpa/inner/MultitenancyTest.java |  14 +-
 .../core/persistence/jpa/inner/RoleTest.java    |  12 +-
 .../persistence/jpa/outer/AnySearchTest.java    |  10 +-
 .../core/persistence/jpa/outer/RoleTest.java    |  18 +-
 .../java/data/RoleDataBinderImpl.java           |   2 +-
 .../rest/cxf/service/AnyObjectServiceImpl.java  |  38 ++-
 .../console/pages/CamelRouteModalPage.java      |   4 +-
 .../client/console/panels/CamelRoutePanel.java  |  10 +-
 .../common/lib/types/CamelEntitlement.java      |  54 ++++
 .../syncope/core/logic/CamelRouteLogic.java     |  10 +-
 .../core/logic/init/CamelRouteLoader.java       |  25 +-
 .../core/reference/AuthenticationITCase.java    | 111 ++++++--
 .../syncope/fit/core/reference/RoleITCase.java  |  40 +--
 82 files changed, 1432 insertions(+), 1109 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementResultManager.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementResultManager.java
index 365532e..6f023c4 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementResultManager.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementResultManager.java
@@ -18,14 +18,13 @@
  */
 package org.apache.syncope.client.cli.commands.entitlement;
 
-import java.util.List;
-import java.util.Set;
+import java.util.Collection;
 import org.apache.syncope.client.cli.commands.CommonsResultManager;
 import org.apache.syncope.common.lib.to.RoleTO;
 
 public class EntitlementResultManager extends CommonsResultManager {
 
-    public void toView(final Set<String> entitlements) {
+    public void toView(final Collection<String> entitlements) {
         System.out.println("");
         for (final String entitlement : entitlements) {
             System.out.println("- " + entitlement);
@@ -33,7 +32,7 @@ public class EntitlementResultManager extends CommonsResultManager {
         System.out.println("");
     }
 
-    public void rolesToView(final Set<RoleTO> roles) {
+    public void rolesToView(final Collection<RoleTO> roles) {
         System.out.println("");
         for (final RoleTO role : roles) {
             printRole(role);
@@ -48,7 +47,7 @@ public class EntitlementResultManager extends CommonsResultManager {
         System.out.println("");
     }
 
-    private void printRealms(final List<String> realms) {
+    private void printRealms(final Collection<String> realms) {
         for (final String realm : realms) {
             System.out.println("       - " + realm);
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementSyncopeOperations.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementSyncopeOperations.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementSyncopeOperations.java
index 17c8eee..ead55e7 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementSyncopeOperations.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementSyncopeOperations.java
@@ -19,24 +19,29 @@
 package org.apache.syncope.client.cli.commands.entitlement;
 
 import java.util.HashSet;
+import java.util.List;
 import java.util.Set;
 import java.util.TreeSet;
+import org.apache.syncope.client.cli.SyncopeServices;
 import org.apache.syncope.client.cli.commands.role.RoleSyncopeOperations;
 import org.apache.syncope.client.cli.commands.user.UserSyncopeOperations;
 import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.to.SyncopeTO;
 import org.apache.syncope.common.lib.to.UserTO;
-import org.apache.syncope.common.lib.types.Entitlement;
+import org.apache.syncope.common.rest.api.service.SyncopeService;
 
 public class EntitlementSyncopeOperations {
 
+    private final SyncopeTO syncopeTO = SyncopeServices.get(SyncopeService.class).info();
+
     private final UserSyncopeOperations userSyncopeOperations = new UserSyncopeOperations();
 
     private final RoleSyncopeOperations roleSyncopeOperations = new RoleSyncopeOperations();
 
-    public Set<String> list() {
-        return Entitlement.values();
+    public List<String> list() {
+        return syncopeTO.getEntitlements();
     }
-    
+
     public boolean exists(final String entitlement) {
         return list().contains(entitlement);
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
index 34f7fe9..87eb0fe 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
@@ -41,7 +41,7 @@ import org.apache.syncope.client.console.resources.WorkflowDefGETResource;
 import org.apache.syncope.client.console.resources.WorkflowDefPUTResource;
 import org.apache.syncope.client.console.themes.AdminLTE;
 import org.apache.syncope.client.lib.SyncopeClientFactoryBean;
-import org.apache.syncope.common.lib.types.Entitlement;
+import org.apache.syncope.common.lib.types.StandardEntitlement;
 import org.apache.wicket.Page;
 import org.apache.wicket.WicketRuntimeException;
 import org.apache.wicket.authroles.authentication.AbstractAuthenticatedWebSession;
@@ -200,7 +200,7 @@ public class SyncopeConsoleApplication extends AuthenticatedWebApplication {
     @Override
     public Class<? extends Page> getHomePage() {
         return AuthenticatedWebSession.get().isSignedIn()
-                && SyncopeConsoleSession.get().owns(Entitlement.MUST_CHANGE_PASSWORD)
+                && SyncopeConsoleSession.get().owns(StandardEntitlement.MUST_CHANGE_PASSWORD)
                         ? MustChangePassword.class
                         : Dashboard.class;
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/commons/AnyDataProvider.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/AnyDataProvider.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/AnyDataProvider.java
index e13840c..dbf823b 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/commons/AnyDataProvider.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/AnyDataProvider.java
@@ -28,11 +28,11 @@ import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvid
 import org.apache.wicket.model.CompoundPropertyModel;
 import org.apache.wicket.model.IModel;
 
-public class AnyDataProvider extends SortableDataProvider<AnyTO, String> {
+public class AnyDataProvider<T extends AnyTO> extends SortableDataProvider<T, String> {
 
     private static final long serialVersionUID = 6267494272884913376L;
 
-    private final SortableAnyProviderComparator comparator;
+    private final SortableAnyProviderComparator<T> comparator;
 
     private String fiql = null;
 
@@ -40,14 +40,19 @@ public class AnyDataProvider extends SortableDataProvider<AnyTO, String> {
 
     private final boolean filtered;
 
-    private final AbstractAnyRestClient restClient;
+    private final AbstractAnyRestClient<T> restClient;
 
     private final String realm;
 
     private final String type;
 
-    public AnyDataProvider(final AbstractAnyRestClient restClient, final int paginatorRows, final boolean filtered,
-            final String realm, final String type) {
+    public AnyDataProvider(
+            final AbstractAnyRestClient<T> restClient,
+            final int paginatorRows,
+            final boolean filtered,
+            final String realm,
+            final String type) {
+
         super();
 
         this.restClient = restClient;
@@ -57,8 +62,8 @@ public class AnyDataProvider extends SortableDataProvider<AnyTO, String> {
         // default sorting
         setSort("key", SortOrder.ASCENDING);
 
-        this.comparator = new SortableAnyProviderComparator(this);
-        
+        this.comparator = new SortableAnyProviderComparator<>(this);
+
         this.realm = realm;
         this.type = type;
     }
@@ -68,14 +73,14 @@ public class AnyDataProvider extends SortableDataProvider<AnyTO, String> {
     }
 
     @Override
-    public Iterator<? extends AnyTO> iterator(final long first, final long count) {
-        List<? extends AnyTO> result;
+    public Iterator<T> iterator(final long first, final long count) {
+        List<T> result;
 
         final int page = ((int) first / paginatorRows);
 
         if (filtered) {
             result = fiql == null
-                    ? Collections.<AnyTO>emptyList()
+                    ? Collections.<T>emptyList()
                     : restClient.search(realm, fiql, (page < 0 ? 0 : page) + 1, paginatorRows, getSort(), type);
         } else {
             result = restClient.list(realm, (page < 0 ? 0 : page) + 1, paginatorRows, getSort(), type);
@@ -101,7 +106,7 @@ public class AnyDataProvider extends SortableDataProvider<AnyTO, String> {
     }
 
     @Override
-    public IModel<AnyTO> model(final AnyTO object) {
+    public IModel<T> model(final T object) {
         return new CompoundPropertyModel<>(object);
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/commons/SortableAnyProviderComparator.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/SortableAnyProviderComparator.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/SortableAnyProviderComparator.java
index 68ea374..668b333 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/commons/SortableAnyProviderComparator.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/SortableAnyProviderComparator.java
@@ -29,19 +29,19 @@ import org.apache.syncope.common.lib.types.SchemaType;
 import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
 import org.apache.wicket.model.AbstractReadOnlyModel;
 
-public class SortableAnyProviderComparator extends SortableDataProviderComparator<AnyTO> {
+public class SortableAnyProviderComparator<T extends AnyTO> extends SortableDataProviderComparator<T> {
 
     private static final long serialVersionUID = 1775967163571699258L;
 
     private static final Set<String> INLINE_PROPS = new HashSet<>(Arrays.asList(
             new String[] { "key", "status", "token", "username" }));
 
-    public SortableAnyProviderComparator(final SortableDataProvider<AnyTO, String> provider) {
+    public SortableAnyProviderComparator(final SortableDataProvider<T, String> provider) {
         super(provider);
     }
 
     @Override
-    public int compare(final AnyTO any1, final AnyTO any2) {
+    public int compare(final T any1, final T any2) {
         if (INLINE_PROPS.contains(provider.getSort().getProperty())) {
             return super.compare(any1, any2);
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/pages/AnyDisplayAttributesModalPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/AnyDisplayAttributesModalPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/AnyDisplayAttributesModalPage.java
index b1214f7..6f304f8 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/AnyDisplayAttributesModalPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/AnyDisplayAttributesModalPage.java
@@ -27,6 +27,7 @@ import org.apache.wicket.PageReference;
 
 /**
  * Modal window with Display user attributes form.
+ *
  * @param <T>
  */
 @SuppressWarnings({ "unchecked", "rawtypes" })
@@ -41,6 +42,7 @@ public class AnyDisplayAttributesModalPage<T extends AnyTO> extends DisplayAttri
             final PageReference pageRef,
             final List<String> schemaNames,
             final List<String> dSchemaNames) {
+
         super(modal, pageRef, schemaNames, dSchemaNames);
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
index a0435e0..16c7151 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java
@@ -24,7 +24,7 @@ import org.apache.syncope.client.console.commons.Constants;
 import org.apache.syncope.client.console.rest.UserWorkflowRestClient;
 import org.apache.syncope.client.console.topology.Topology;
 import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
-import org.apache.syncope.common.lib.types.Entitlement;
+import org.apache.syncope.common.lib.types.StandardEntitlement;
 import org.apache.wicket.Component;
 import org.apache.wicket.Page;
 import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -68,10 +68,11 @@ public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware {
         add(todosContainer);
         Label todos = new Label("todos", "0");
         todosContainer.add(todos);
-        if (SyncopeConsoleSession.get().owns(Entitlement.WORKFLOW_FORM_LIST)) {
+        if (SyncopeConsoleSession.get().owns(StandardEntitlement.WORKFLOW_FORM_LIST)) {
             todos.setDefaultModelObject(userWorkflowRestClient.getForms().size());
         }
-        MetaDataRoleAuthorizationStrategy.authorize(todosContainer, WebPage.RENDER, Entitlement.WORKFLOW_FORM_LIST);
+        MetaDataRoleAuthorizationStrategy.authorize(todosContainer, WebPage.RENDER,
+                StandardEntitlement.WORKFLOW_FORM_LIST);
 
         // menu
         WebMarkupContainer liContainer = new WebMarkupContainer(getLIContainerId("dashboard"));
@@ -86,13 +87,13 @@ public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware {
         liContainer = new WebMarkupContainer(getLIContainerId("schemas"));
         confULContainer.add(liContainer);
         BookmarkablePageLink<Page> schemaLink = new BookmarkablePageLink<>("schemas", Schemas.class);
-//        MetaDataRoleAuthorizationStrategy.authorize(schemaLink, WebPage.ENABLE, Entitlement.SCHEMA_LIST);
+//        MetaDataRoleAuthorizationStrategy.authorize(schemaLink, WebPage.ENABLE, StandardEntitlement.SCHEMA_LIST);
         liContainer.add(schemaLink);
 
         liContainer = new WebMarkupContainer(getLIContainerId("workflow"));
         confULContainer.add(liContainer);
         BookmarkablePageLink<Page> link = new BookmarkablePageLink<>("workflow", Workflow.class);
-        MetaDataRoleAuthorizationStrategy.authorize(link, WebPage.ENABLE, Entitlement.WORKFLOW_DEF_READ);
+        MetaDataRoleAuthorizationStrategy.authorize(link, WebPage.ENABLE, StandardEntitlement.WORKFLOW_DEF_READ);
         liContainer.add(link);
 
         liContainer = new WebMarkupContainer(getLIContainerId("realms"));

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
index ef1d433..b8a48d9 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Realms.java
@@ -29,7 +29,7 @@ import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicating
 import org.apache.syncope.client.console.wicket.markup.html.bootstrap.confirmation.ConfirmationModalBehavior;
 import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
 import org.apache.syncope.common.lib.to.RealmTO;
-import org.apache.syncope.common.lib.types.Entitlement;
+import org.apache.syncope.common.lib.types.StandardEntitlement;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
@@ -147,8 +147,8 @@ public class Realms extends BasePage {
 
         deleteLink.add(new ConfirmationModalBehavior());
 
-        if (SyncopeConsoleSession.get().owns(Entitlement.REALM_DELETE)) {
-            MetaDataRoleAuthorizationStrategy.authorize(deleteLink, ENABLE, Entitlement.REALM_DELETE);
+        if (SyncopeConsoleSession.get().owns(StandardEntitlement.REALM_DELETE)) {
+            MetaDataRoleAuthorizationStrategy.authorize(deleteLink, ENABLE, StandardEntitlement.REALM_DELETE);
         }
 
         content.addOrReplace(deleteLink);
@@ -172,7 +172,7 @@ public class Realms extends BasePage {
                         Realms.this.getPageReference(),
                         realmTO,
                         realmSidebarPanel.getCurrentRealm().getFullPath(),
-                        Entitlement.REALM_CREATE,
+                        StandardEntitlement.REALM_CREATE,
                         true);
                 target.add(modal.setContent(panel));
 
@@ -181,8 +181,8 @@ public class Realms extends BasePage {
             }
         };
 
-        if (SyncopeConsoleSession.get().owns(Entitlement.REALM_CREATE)) {
-            MetaDataRoleAuthorizationStrategy.authorize(createLink, ENABLE, Entitlement.REALM_CREATE);
+        if (SyncopeConsoleSession.get().owns(StandardEntitlement.REALM_CREATE)) {
+            MetaDataRoleAuthorizationStrategy.authorize(createLink, ENABLE, StandardEntitlement.REALM_CREATE);
         }
 
         content.addOrReplace(createLink);
@@ -205,7 +205,7 @@ public class Realms extends BasePage {
                         Realms.this.getPageReference(),
                         realmTO,
                         realmTO.getFullPath(),
-                        Entitlement.REALM_UPDATE,
+                        StandardEntitlement.REALM_UPDATE,
                         false);
                 target.add(modal.setContent(panel));
 
@@ -214,8 +214,8 @@ public class Realms extends BasePage {
             }
         };
 
-        if (SyncopeConsoleSession.get().owns(Entitlement.REALM_UPDATE)) {
-            MetaDataRoleAuthorizationStrategy.authorize(editLink, ENABLE, Entitlement.REALM_UPDATE);
+        if (SyncopeConsoleSession.get().owns(StandardEntitlement.REALM_UPDATE)) {
+            MetaDataRoleAuthorizationStrategy.authorize(editLink, ENABLE, StandardEntitlement.REALM_UPDATE);
         }
 
         content.addOrReplace(editLink);

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/pages/Schemas.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Schemas.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Schemas.java
index 421ef00..0c70fcb 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/Schemas.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Schemas.java
@@ -29,7 +29,6 @@ import org.apache.syncope.client.console.panels.SchemasPanel;
 import org.apache.syncope.client.console.wicket.ajax.markup.html.ClearIndicatingAjaxLink;
 import org.apache.syncope.client.console.wicket.markup.html.bootstrap.dialog.BaseModal;
 import org.apache.syncope.common.lib.to.AbstractSchemaTO;
-import org.apache.syncope.common.lib.types.Entitlement;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
@@ -44,6 +43,7 @@ import org.apache.wicket.model.Model;
 import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
 import org.apache.syncope.client.console.panels.SchemaModalPanel;
+import org.apache.syncope.common.lib.types.StandardEntitlement;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 
 public class Schemas extends BasePage {
@@ -134,8 +134,8 @@ public class Schemas extends BasePage {
             }
         };
 
-        if (SyncopeConsoleSession.get().owns(Entitlement.SCHEMA_CREATE)) {
-            MetaDataRoleAuthorizationStrategy.authorize(createLink, ENABLE, Entitlement.SCHEMA_CREATE);
+        if (SyncopeConsoleSession.get().owns(StandardEntitlement.SCHEMA_CREATE)) {
+            MetaDataRoleAuthorizationStrategy.authorize(createLink, ENABLE, StandardEntitlement.SCHEMA_CREATE);
         }
 
         return createLink;

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/pages/Workflow.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Workflow.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Workflow.java
index 3a0ef0b..6d90a19 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/Workflow.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Workflow.java
@@ -22,7 +22,7 @@ import java.io.File;
 import org.apache.syncope.client.console.SyncopeConsoleApplication;
 import org.apache.syncope.client.console.rest.WorkflowRestClient;
 import org.apache.syncope.client.console.wicket.markup.html.link.VeilPopupSettings;
-import org.apache.syncope.common.lib.types.Entitlement;
+import org.apache.syncope.common.lib.types.StandardEntitlement;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.image.Image;
@@ -45,20 +45,20 @@ public class Workflow extends BasePage {
         noActivitiEnabledForUsers.setOutputMarkupPlaceholderTag(true);
         add(noActivitiEnabledForUsers);
 
-        WebMarkupContainer workflowDefContainer = new WebMarkupContainer("workflowDefContainer");
-        workflowDefContainer.setOutputMarkupPlaceholderTag(true);
+        WebMarkupContainer workflowDef = new WebMarkupContainer("workflowDefContainer");
+        workflowDef.setOutputMarkupPlaceholderTag(true);
 
         if (wfRestClient.isActivitiEnabledForUsers()) {
             noActivitiEnabledForUsers.setVisible(false);
         } else {
-            workflowDefContainer.setVisible(false);
+            workflowDef.setVisible(false);
         }
 
         BookmarkablePageLink<Void> activitiModeler =
                 new BookmarkablePageLink<>("activitiModeler", ActivitiModelerPopupPage.class);
         activitiModeler.setPopupSettings(new VeilPopupSettings().setHeight(600).setWidth(800));
-        MetaDataRoleAuthorizationStrategy.authorize(activitiModeler, ENABLE, Entitlement.WORKFLOW_DEF_READ);
-        workflowDefContainer.add(activitiModeler);
+        MetaDataRoleAuthorizationStrategy.authorize(activitiModeler, ENABLE, StandardEntitlement.WORKFLOW_DEF_READ);
+        workflowDef.add(activitiModeler);
         // Check if Activiti Modeler directory is found
         boolean activitiModelerEnabled = false;
         try {
@@ -71,8 +71,8 @@ public class Workflow extends BasePage {
 
         BookmarkablePageLink<Void> xmlEditor = new BookmarkablePageLink<>("xmlEditor", XMLEditorPopupPage.class);
         xmlEditor.setPopupSettings(new VeilPopupSettings().setHeight(480).setWidth(800));
-        MetaDataRoleAuthorizationStrategy.authorize(xmlEditor, ENABLE, Entitlement.WORKFLOW_DEF_READ);
-        workflowDefContainer.add(xmlEditor);
+        MetaDataRoleAuthorizationStrategy.authorize(xmlEditor, ENABLE, StandardEntitlement.WORKFLOW_DEF_READ);
+        workflowDef.add(xmlEditor);
 
         Image workflowDefDiagram = new Image("workflowDefDiagram", new Model<IResource>()) {
 
@@ -93,10 +93,10 @@ public class Workflow extends BasePage {
                 };
             }
         };
-        workflowDefContainer.add(workflowDefDiagram);
+        workflowDef.add(workflowDefDiagram);
 
-        MetaDataRoleAuthorizationStrategy.authorize(workflowDefContainer, ENABLE, Entitlement.WORKFLOW_DEF_READ);
-        add(workflowDefContainer);
+        MetaDataRoleAuthorizationStrategy.authorize(workflowDef, ENABLE, StandardEntitlement.WORKFLOW_DEF_READ);
+        add(workflowDef);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java
index 00d2c7f..e2a585f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/XMLEditorPopupPage.java
@@ -24,7 +24,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.syncope.client.console.commons.Constants;
 import org.apache.syncope.client.console.rest.WorkflowRestClient;
 import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.types.Entitlement;
+import org.apache.syncope.common.lib.types.StandardEntitlement;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
@@ -57,29 +57,29 @@ public class XMLEditorPopupPage extends BasePopupPage {
         AjaxButton submit =
                 new IndicatingAjaxButton(APPLY, new Model<>(getString(SUBMIT))) {
 
-                    private static final long serialVersionUID = -958724007591692537L;
+            private static final long serialVersionUID = -958724007591692537L;
 
-                    @Override
-                    protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-                        try {
-                            wfRestClient.updateDefinition(
-                                    MediaType.APPLICATION_XML_TYPE, workflowDefArea.getModelObject());
-                            info(getString(Constants.OPERATION_SUCCEEDED));
-                        } catch (SyncopeClientException scee) {
-                            error(getString(Constants.ERROR) + ": " + scee.getMessage());
-                        }
-                        feedbackPanel.refresh(target);
-                    }
+            @Override
+            protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
+                try {
+                    wfRestClient.updateDefinition(
+                            MediaType.APPLICATION_XML_TYPE, workflowDefArea.getModelObject());
+                    info(getString(Constants.OPERATION_SUCCEEDED));
+                } catch (SyncopeClientException scee) {
+                    error(getString(Constants.ERROR) + ": " + scee.getMessage());
+                }
+                feedbackPanel.refresh(target);
+            }
 
-                    @Override
-                    protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-                        feedbackPanel.refresh(target);
-                    }
-                };
+            @Override
+            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+                feedbackPanel.refresh(target);
+            }
+        };
 
         final Button close = new Button("closePage", new Model<>(getString(CANCEL)));
 
-        MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, Entitlement.WORKFLOW_DEF_UPDATE);
+        MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, StandardEntitlement.WORKFLOW_DEF_UPDATE);
         wfForm.add(submit);
         wfForm.add(close);
         this.add(wfForm);

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
index efd561b..4907f77 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AbstractSearchResultPanel.java
@@ -18,7 +18,6 @@
  */
 package org.apache.syncope.client.console.panels;
 
-import java.io.Serializable;
 import java.util.Collection;
 import java.util.List;
 import org.apache.syncope.client.console.PreferenceManager;
@@ -55,7 +54,7 @@ public abstract class AbstractSearchResultPanel<T extends AnyTO> extends WizardM
      */
     protected PreferenceManager prefMan = new PreferenceManager();
 
-    protected final AbstractAnyRestClient restClient;
+    protected final AbstractAnyRestClient<T> restClient;
 
     /**
      * Number of rows per page.
@@ -86,12 +85,12 @@ public abstract class AbstractSearchResultPanel<T extends AnyTO> extends WizardM
     /**
      * Result table.
      */
-    private AjaxDataTablePanel<AnyTO, String> resultTable;
+    private AjaxDataTablePanel<T, String> resultTable;
 
     /**
      * Data provider used to search for users.
      */
-    private AnyDataProvider dataProvider;
+    private AnyDataProvider<T> dataProvider;
 
     /**
      * Owner page.
@@ -108,12 +107,12 @@ public abstract class AbstractSearchResultPanel<T extends AnyTO> extends WizardM
      */
     private final String type;
 
-    protected <T extends AnyTO> AbstractSearchResultPanel(
+    protected AbstractSearchResultPanel(
             final String id,
             final boolean filtered,
             final String fiql,
             final PageReference pageRef,
-            final AbstractAnyRestClient restClient,
+            final AbstractAnyRestClient<T> restClient,
             final String realm,
             final String type) {
 
@@ -138,7 +137,7 @@ public abstract class AbstractSearchResultPanel<T extends AnyTO> extends WizardM
 
         this.realm = realm;
         this.type = type;
-        
+
         setWindowClosedReloadCallback(modal);
     }
 
@@ -188,7 +187,7 @@ public abstract class AbstractSearchResultPanel<T extends AnyTO> extends WizardM
     }
 
     private void updateResultTable(final boolean create, final int rows) {
-        dataProvider = new AnyDataProvider(restClient, rows, filtered, realm, type);
+        dataProvider = new AnyDataProvider<>(restClient, rows, filtered, realm, type);
         dataProvider.setFIQL(fiql);
 
         final int currentPage = resultTable != null
@@ -216,7 +215,7 @@ public abstract class AbstractSearchResultPanel<T extends AnyTO> extends WizardM
         container.addOrReplace(resultTable);
     }
 
-    protected abstract List<IColumn<AnyTO, String>> getColumns();
+    protected abstract List<IColumn<T, String>> getColumns();
 
     @Override
     public void onEvent(final IEvent<?> event) {
@@ -298,9 +297,9 @@ public abstract class AbstractSearchResultPanel<T extends AnyTO> extends WizardM
 
     protected abstract String getPageId();
 
-    public abstract static class Builder<T extends Serializable> extends WizardMgtPanel.Builder<T> {
+    public abstract static class Builder<T extends AnyTO> extends WizardMgtPanel.Builder<T> {
 
-        private static final long serialVersionUID = 1L;
+        private static final long serialVersionUID = 5088962796986706805L;
 
         /**
          * Specify if results are about a filtered search or not. Using this attribute it is possible to use this panel
@@ -314,7 +313,7 @@ public abstract class AbstractSearchResultPanel<T extends AnyTO> extends WizardM
          */
         protected final String fiql;
 
-        protected final AbstractAnyRestClient restClient;
+        protected final AbstractAnyRestClient<T> restClient;
 
         /**
          * Realm related to current panel.
@@ -331,9 +330,10 @@ public abstract class AbstractSearchResultPanel<T extends AnyTO> extends WizardM
                 final boolean filtered,
                 final String fiql,
                 final PageReference pageRef,
-                final AbstractAnyRestClient restClient,
+                final AbstractAnyRestClient<T> restClient,
                 final String realm,
                 final String type) {
+
             super(reference, pageRef);
             this.filtered = filtered;
             this.fiql = fiql;

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
index 3cc5e93..d68a9c4 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AnySearchResultPanel.java
@@ -62,7 +62,7 @@ public class AnySearchResultPanel<T extends AnyTO> extends AbstractSearchResultP
 
     protected final String pageID = "Any";
 
-    private final String entitlement = "USER_LIST";
+    protected final String entitlement;
 
     protected AnySearchResultPanel(
             final String type,
@@ -70,11 +70,14 @@ public class AnySearchResultPanel<T extends AnyTO> extends AbstractSearchResultP
             final boolean filtered,
             final String fiql,
             final PageReference callerRef,
-            final AbstractAnyRestClient restClient,
+            final AbstractAnyRestClient<T> restClient,
             final List<AnyTypeClassTO> anyTypeClassTOs,
-            final String realm) {
+            final String realm,
+            final String entitlement) {
 
         super(parentId, filtered, fiql, callerRef, restClient, realm, type);
+        this.entitlement = entitlement;
+
         add(new Label("name", type));
 
         this.schemaNames = new ArrayList<>();
@@ -90,68 +93,64 @@ public class AnySearchResultPanel<T extends AnyTO> extends AbstractSearchResultP
     }
 
     @Override
-    protected List<IColumn<AnyTO, String>> getColumns() {
-
-        final List<IColumn<AnyTO, String>> columns = new ArrayList<IColumn<AnyTO, String>>();
+    protected List<IColumn<T, String>> getColumns() {
+        final List<IColumn<T, String>> columns = new ArrayList<>();
 
         for (String name : prefMan.getList(getRequest(), Constants.PREF_ANY_DETAILS_VIEW)) {
             final Field field = ReflectionUtils.findField(AnyObjectTO.class, name);
 
             if ("token".equalsIgnoreCase(name)) {
-                columns.add(new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
+                columns.add(new PropertyColumn<T, String>(new ResourceModel(name, name), name, name));
             } else if (field != null && field.getType().equals(Date.class)) {
-                columns.add(new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
+                columns.add(new PropertyColumn<T, String>(new ResourceModel(name, name), name, name));
             } else {
-                columns.add(
-                        new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
+                columns.add(new PropertyColumn<T, String>(new ResourceModel(name, name), name, name));
             }
         }
 
         for (String name : prefMan.getList(getRequest(), Constants.PREF_ANY_ATTRIBUTES_VIEW)) {
             if (schemaNames.contains(name)) {
-                columns.add(new AttrColumn(name, SchemaType.PLAIN));
+                columns.add(new AttrColumn<T>(name, SchemaType.PLAIN));
             }
         }
 
         for (String name : prefMan.getList(getRequest(), Constants.PREF_ANY_DERIVED_ATTRIBUTES_VIEW)) {
             if (dSchemaNames.contains(name)) {
-                columns.add(new AttrColumn(name, SchemaType.DERIVED));
+                columns.add(new AttrColumn<T>(name, SchemaType.DERIVED));
             }
         }
 
         // Add defaults in case of no selection
         if (columns.isEmpty()) {
             for (String name : AnyDisplayAttributesModalPage.ANY_DEFAULT_SELECTION) {
-                columns.add(
-                        new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
+                columns.add(new PropertyColumn<T, String>(new ResourceModel(name, name), name, name));
             }
 
         }
 
-        columns.add(new ActionColumn<AnyTO, String>(new ResourceModel("actions", "")) {
+        columns.add(new ActionColumn<T, String>(new ResourceModel("actions", "")) {
 
             private static final long serialVersionUID = -3503023501954863131L;
 
             @Override
-            public ActionLinksPanel<AnyTO> getActions(final String componentId, final IModel<AnyTO> model) {
-
-                final ActionLinksPanel.Builder<AnyTO> panel = ActionLinksPanel.builder(page.getPageReference());
+            public ActionLinksPanel<T> getActions(final String componentId, final IModel<T> model) {
+                final ActionLinksPanel.Builder<T> panel = ActionLinksPanel.builder(page.getPageReference());
 
-                panel.add(new ActionLink<AnyTO>() {
+                panel.add(new ActionLink<T>() {
 
                     private static final long serialVersionUID = -7978723352517770644L;
 
                     @Override
                     public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
                         send(AnySearchResultPanel.this, Broadcast.BREADTH,
-                                new AjaxWizard.NewItemActionEvent<AnyTO>(model.getObject(), target));
+                                new AjaxWizard.NewItemActionEvent<>(model.getObject(), target));
                     }
-                }, ActionLink.ActionType.EDIT, entitlement).add(new ActionLink<AnyTO>() {
+                }, ActionLink.ActionType.EDIT, entitlement).add(new ActionLink<T>() {
 
                     private static final long serialVersionUID = -7978723352517770644L;
 
                     @Override
-                    public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
+                    public void onClick(final AjaxRequestTarget target, final T anyTO) {
                         try {
                             restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
                             info(getString(Constants.OPERATION_SUCCEEDED));
@@ -178,7 +177,7 @@ public class AnySearchResultPanel<T extends AnyTO> extends AbstractSearchResultP
                     @Override
                     public void onClick(final AjaxRequestTarget target, final Serializable ignore) {
                         // still missing content
-                        target.add(modal.setContent(new AnyDisplayAttributesModalPage<T>(
+                        target.add(modal.setContent(new AnyDisplayAttributesModalPage<>(
                                 modal, page.getPageReference(), schemaNames, dSchemaNames)));
 
                         modal.header(new ResourceModel("any.attr.display", ""));
@@ -205,7 +204,7 @@ public class AnySearchResultPanel<T extends AnyTO> extends AbstractSearchResultP
 
     @Override
     protected <T extends AnyTO> Collection<ActionLink.ActionType> getBulkActions() {
-        final List<ActionLink.ActionType> bulkActions = new ArrayList<ActionLink.ActionType>();
+        final List<ActionLink.ActionType> bulkActions = new ArrayList<>();
 
         bulkActions.add(ActionLink.ActionType.DELETE);
         bulkActions.add(ActionLink.ActionType.SUSPEND);
@@ -221,7 +220,7 @@ public class AnySearchResultPanel<T extends AnyTO> extends AbstractSearchResultP
 
     public static final class Builder extends AbstractSearchResultPanel.Builder<AnyObjectTO> {
 
-        private static final long serialVersionUID = 1L;
+        private static final long serialVersionUID = -6828423611982275640L;
 
         private final List<AnyTypeClassTO> anyTypeClassTOs;
 
@@ -229,18 +228,19 @@ public class AnySearchResultPanel<T extends AnyTO> extends AbstractSearchResultP
                 final boolean filtered,
                 final String fiql,
                 final PageReference pageRef,
-                final AbstractAnyRestClient restClient,
+                final AbstractAnyRestClient<AnyObjectTO> restClient,
                 final List<AnyTypeClassTO> anyTypeClassTOs,
                 final String realm,
                 final String type) {
+
             super(AnyObjectTO.class, filtered, fiql, pageRef, restClient, realm, type);
             this.anyTypeClassTOs = anyTypeClassTOs;
         }
 
         @Override
         protected WizardMgtPanel<AnyObjectTO> newInstance(final String parentId) {
-            return new AnySearchResultPanel<AnyObjectTO>(
-                    type, parentId, filtered, fiql, pageRef, restClient, anyTypeClassTOs, realm);
+            return new AnySearchResultPanel<>(
+                    type, parentId, filtered, fiql, pageRef, restClient, anyTypeClassTOs, realm, type + "_LIST");
         }
 
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java
index 3e94680..e803113 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/GroupSearchResultPanel.java
@@ -41,6 +41,7 @@ import org.apache.syncope.common.lib.to.AnyTO;
 import org.apache.syncope.common.lib.to.AnyTypeClassTO;
 import org.apache.syncope.common.lib.to.GroupTO;
 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;
@@ -62,76 +63,75 @@ public final class GroupSearchResultPanel extends AnySearchResultPanel<GroupTO>
             final boolean filtered,
             final String fiql,
             final PageReference callerRef,
-            final AbstractAnyRestClient restClient,
+            final AbstractAnyRestClient<GroupTO> restClient,
             final List<AnyTypeClassTO> anyTypeClassTOs,
-            final String realm) {
+            final String realm,
+            final String entitlement) {
 
-        super(type, parentId, filtered, fiql, callerRef, restClient, anyTypeClassTOs, realm);
+        super(type, parentId, filtered, fiql, callerRef, restClient, anyTypeClassTOs, realm, entitlement);
     }
 
     @Override
-    protected List<IColumn<AnyTO, String>> getColumns() {
-
-        final List<IColumn<AnyTO, String>> columns = new ArrayList<>();
+    protected List<IColumn<GroupTO, String>> getColumns() {
+        final List<IColumn<GroupTO, String>> columns = new ArrayList<>();
 
         for (String name : prefMan.getList(getRequest(), Constants.PREF_GROUP_DETAILS_VIEW)) {
             final Field field = ReflectionUtils.findField(GroupTO.class, name);
 
             if ("token".equalsIgnoreCase(name)) {
-                columns.add(new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
+                columns.add(new PropertyColumn<GroupTO, String>(new ResourceModel(name, name), name, name));
             } else if (field != null && field.getType().equals(Date.class)) {
-                columns.add(new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
+                columns.add(new PropertyColumn<GroupTO, String>(new ResourceModel(name, name), name, name));
             } else {
-                columns.add(new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
+                columns.add(new PropertyColumn<GroupTO, String>(new ResourceModel(name, name), name, name));
             }
         }
 
         for (String name : prefMan.getList(getRequest(), Constants.PREF_GROUP_ATTRIBUTES_VIEW)) {
             if (schemaNames.contains(name)) {
-                columns.add(new AttrColumn(name, SchemaType.PLAIN));
+                columns.add(new AttrColumn<GroupTO>(name, SchemaType.PLAIN));
             }
         }
 
         for (String name : prefMan.getList(getRequest(), Constants.PREF_GROUP_DERIVED_ATTRIBUTES_VIEW)) {
             if (dSchemaNames.contains(name)) {
-                columns.add(new AttrColumn(name, SchemaType.DERIVED));
+                columns.add(new AttrColumn<GroupTO>(name, SchemaType.DERIVED));
             }
         }
 
         // Add defaults in case of no selection
         if (columns.isEmpty()) {
             for (String name : GroupDisplayAttributesModalPage.GROUP_DEFAULT_SELECTION) {
-                columns.add(new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
+                columns.add(new PropertyColumn<GroupTO, String>(new ResourceModel(name, name), name, name));
             }
 
             prefMan.setList(getRequest(), getResponse(), Constants.PREF_GROUP_DETAILS_VIEW,
                     Arrays.asList(GroupDisplayAttributesModalPage.GROUP_DEFAULT_SELECTION));
         }
 
-        columns.add(new ActionColumn<AnyTO, String>(new ResourceModel("actions", "")) {
+        columns.add(new ActionColumn<GroupTO, String>(new ResourceModel("actions", "")) {
 
             private static final long serialVersionUID = -3503023501954863131L;
 
             @Override
-            public ActionLinksPanel<AnyTO> getActions(final String componentId, final IModel<AnyTO> model) {
-
-                final ActionLinksPanel.Builder<AnyTO> panel = ActionLinksPanel.builder(page.getPageReference());
+            public ActionLinksPanel<GroupTO> getActions(final String componentId, final IModel<GroupTO> model) {
+                final ActionLinksPanel.Builder<GroupTO> panel = ActionLinksPanel.builder(page.getPageReference());
 
-                panel.add(new ActionLink<AnyTO>() {
+                panel.add(new ActionLink<GroupTO>() {
 
                     private static final long serialVersionUID = -7978723352517770644L;
 
                     @Override
-                    public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
+                    public void onClick(final AjaxRequestTarget target, final GroupTO anyTO) {
                         send(GroupSearchResultPanel.this, Broadcast.BREADTH,
                                 new AjaxWizard.NewItemActionEvent<AnyTO>(model.getObject(), target));
                     }
-                }, ActionLink.ActionType.EDIT, entitlement).add(new ActionLink<AnyTO>() {
+                }, ActionLink.ActionType.EDIT, entitlement).add(new ActionLink<GroupTO>() {
 
                     private static final long serialVersionUID = -7978723352517770644L;
 
                     @Override
-                    public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
+                    public void onClick(final AjaxRequestTarget target, final GroupTO anyTO) {
                         try {
                             restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
                             info(getString(Constants.OPERATION_SUCCEEDED));
@@ -235,10 +235,11 @@ public final class GroupSearchResultPanel extends AnySearchResultPanel<GroupTO>
                 final boolean filtered,
                 final String fiql,
                 final PageReference pageRef,
-                final AbstractAnyRestClient restClient,
+                final AbstractAnyRestClient<GroupTO> restClient,
                 final List<AnyTypeClassTO> anyTypeClassTOs,
                 final String realm,
                 final String type) {
+
             super(GroupTO.class, filtered, fiql, pageRef, restClient, realm, type);
             this.anyTypeClassTOs = anyTypeClassTOs;
         }
@@ -246,7 +247,8 @@ public final class GroupSearchResultPanel extends AnySearchResultPanel<GroupTO>
         @Override
         protected WizardMgtPanel<GroupTO> newInstance(final String parentId) {
             return new GroupSearchResultPanel(
-                    type, parentId, filtered, fiql, pageRef, restClient, anyTypeClassTOs, realm);
+                    type, parentId, filtered, fiql, pageRef, restClient, anyTypeClassTOs, realm,
+                    StandardEntitlement.GROUP_SEARCH);
         }
 
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
index dd73ba3..2ee2073 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceMappingPanel.java
@@ -46,9 +46,9 @@ import org.apache.syncope.common.lib.to.ProvisionTO;
 import org.apache.syncope.common.lib.to.ResourceTO;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.common.lib.types.ConnConfProperty;
-import org.apache.syncope.common.lib.types.Entitlement;
 import org.apache.syncope.common.lib.types.IntMappingType;
 import org.apache.syncope.common.lib.types.MappingPurpose;
+import org.apache.syncope.common.lib.types.StandardEntitlement;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
@@ -253,7 +253,7 @@ public class ResourceMappingPanel extends Panel {
                             target.add(ResourceMappingPanel.this);
                         }
                     }
-                }, ActionLink.ActionType.DELETE, Entitlement.RESOURCE_UPDATE);
+                }, ActionLink.ActionType.DELETE, StandardEntitlement.RESOURCE_UPDATE);
 
                 item.add(actions.build("toRemove"));
 
@@ -448,11 +448,11 @@ public class ResourceMappingPanel extends Panel {
         return CollectionUtils.collect(connRestClient.buildObjectClassInfo(connInstanceTO, true),
                 new Transformer<ConnIdObjectClassTO, String>() {
 
-                    @Override
-                    public String transform(final ConnIdObjectClassTO input) {
-                        return input.getType();
-                    }
-                },
+            @Override
+            public String transform(final ConnIdObjectClassTO input) {
+                return input.getType();
+            }
+        },
                 new ArrayList<String>());
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
index 74b9ed2..87e8622 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ResourceModal.java
@@ -38,7 +38,7 @@ import org.apache.syncope.client.console.wizards.provision.ProvisionWizardBuilde
 import org.apache.syncope.common.lib.to.MappingItemTO;
 import org.apache.syncope.common.lib.to.ProvisionTO;
 import org.apache.syncope.common.lib.to.ResourceTO;
-import org.apache.syncope.common.lib.types.Entitlement;
+import org.apache.syncope.common.lib.types.StandardEntitlement;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
@@ -103,7 +103,7 @@ public class ResourceModal extends AbstractResourceModal {
                 send(pageRef.getPage(), Broadcast.DEPTH,
                         new AjaxWizard.NewItemActionEvent<>(provisionTO, 2, target));
             }
-        }, ActionLink.ActionType.MAPPING, Entitlement.RESOURCE_UPDATE).addAction(new ActionLink<ProvisionTO>() {
+        }, ActionLink.ActionType.MAPPING, StandardEntitlement.RESOURCE_UPDATE).addAction(new ActionLink<ProvisionTO>() {
 
             private static final long serialVersionUID = -3722207913631435514L;
 
@@ -112,7 +112,8 @@ public class ResourceModal extends AbstractResourceModal {
                 send(pageRef.getPage(), Broadcast.DEPTH,
                         new AjaxWizard.NewItemActionEvent<>(provisionTO, 3, target));
             }
-        }, ActionLink.ActionType.ACCOUNT_LINK, Entitlement.RESOURCE_UPDATE).addAction(new ActionLink<ProvisionTO>() {
+        }, ActionLink.ActionType.ACCOUNT_LINK, StandardEntitlement.RESOURCE_UPDATE).addAction(
+                new ActionLink<ProvisionTO>() {
 
             private static final long serialVersionUID = -3722207913631435524L;
 
@@ -122,26 +123,28 @@ public class ResourceModal extends AbstractResourceModal {
                 send(pageRef.getPage(), Broadcast.DEPTH,
                         new AjaxWizard.NewItemFinishEvent<>(provisionTO, target));
             }
-        }, ActionLink.ActionType.RESET_TIME, Entitlement.RESOURCE_UPDATE).addAction(new ActionLink<ProvisionTO>() {
+        }, ActionLink.ActionType.RESET_TIME, StandardEntitlement.RESOURCE_UPDATE).addAction(
+                        new ActionLink<ProvisionTO>() {
 
-            private static final long serialVersionUID = -3722207913631435534L;
+                    private static final long serialVersionUID = -3722207913631435534L;
 
-            @Override
-            public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) {
-                send(pageRef.getPage(), Broadcast.DEPTH,
-                        new AjaxWizard.NewItemActionEvent<>(SerializationUtils.clone(provisionTO), target));
-            }
-        }, ActionLink.ActionType.CLONE, Entitlement.RESOURCE_CREATE).addAction(new ActionLink<ProvisionTO>() {
+                    @Override
+                    public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) {
+                        send(pageRef.getPage(), Broadcast.DEPTH,
+                                new AjaxWizard.NewItemActionEvent<>(SerializationUtils.clone(provisionTO), target));
+                    }
+                }, ActionLink.ActionType.CLONE, StandardEntitlement.RESOURCE_CREATE).addAction(
+                        new ActionLink<ProvisionTO>() {
 
-            private static final long serialVersionUID = -3722207913631435544L;
+                    private static final long serialVersionUID = -3722207913631435544L;
 
-            @Override
-            public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) {
-                model.getObject().getProvisions().remove(provisionTO);
-                send(pageRef.getPage(), Broadcast.DEPTH,
-                        new AjaxWizard.NewItemFinishEvent<ProvisionTO>(null, target));
-            }
-        }, ActionLink.ActionType.DELETE, Entitlement.RESOURCE_DELETE);
+                    @Override
+                    public void onClick(final AjaxRequestTarget target, final ProvisionTO provisionTO) {
+                        model.getObject().getProvisions().remove(provisionTO);
+                        send(pageRef.getPage(), Broadcast.DEPTH,
+                                new AjaxWizard.NewItemFinishEvent<ProvisionTO>(null, target));
+                    }
+                }, ActionLink.ActionType.DELETE, StandardEntitlement.RESOURCE_DELETE);
 
         builder.addNewItemPanelBuilder(new ProvisionWizardBuilder("wizard", model.getObject(), pageRef));
         builder.addNotificationPanel(modal.getFeedbackPanel());
@@ -180,7 +183,7 @@ public class ResourceModal extends AbstractResourceModal {
                         modal.getFeedbackPanel().refresh(target);
                     }
                 };
-                MetaDataRoleAuthorizationStrategy.authorize(panel, ENABLE, Entitlement.CONNECTOR_READ);
+                MetaDataRoleAuthorizationStrategy.authorize(panel, ENABLE, StandardEntitlement.CONNECTOR_READ);
                 return panel;
             }
         });
@@ -222,11 +225,11 @@ public class ResourceModal extends AbstractResourceModal {
                     int uConnObjectKeyCount = CollectionUtils.countMatches(
                             provision.getMapping().getItems(), new Predicate<MappingItemTO>() {
 
-                                @Override
-                                public boolean evaluate(final MappingItemTO item) {
-                                    return item.isConnObjectKey();
-                                }
-                            });
+                        @Override
+                        public boolean evaluate(final MappingItemTO item) {
+                            return item.isConnObjectKey();
+                        }
+                    });
 
                     connObjectKeyError = uConnObjectKeyCount != 1;
                 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemasPanel.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemasPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemasPanel.java
index a66afa6..a449044 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemasPanel.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/SchemasPanel.java
@@ -41,8 +41,8 @@ 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.wicket.markup.html.form.SelectChoiceRenderer;
 import org.apache.syncope.common.lib.to.AbstractSchemaTO;
-import org.apache.syncope.common.lib.types.Entitlement;
 import org.apache.syncope.common.lib.types.SchemaType;
+import org.apache.syncope.common.lib.types.StandardEntitlement;
 import org.apache.wicket.AttributeModifier;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -77,14 +77,14 @@ public class SchemasPanel extends Panel {
     private static final Map<SchemaType, String> PAGINATOR_ROWS_KEYS =
             new HashMap<SchemaType, String>() {
 
-                private static final long serialVersionUID = 3109256773218160485L;
+        private static final long serialVersionUID = 3109256773218160485L;
 
-                {
-                    put(SchemaType.PLAIN, Constants.PREF_CONF_SCHEMA_PAGINATOR_ROWS);
-                    put(SchemaType.DERIVED, Constants.PREF_CONF_SCHEMA_PAGINATOR_ROWS);
-                    put(SchemaType.VIRTUAL, Constants.PREF_CONF_SCHEMA_PAGINATOR_ROWS);
-                }
-            };
+        {
+            put(SchemaType.PLAIN, Constants.PREF_CONF_SCHEMA_PAGINATOR_ROWS);
+            put(SchemaType.DERIVED, Constants.PREF_CONF_SCHEMA_PAGINATOR_ROWS);
+            put(SchemaType.VIRTUAL, Constants.PREF_CONF_SCHEMA_PAGINATOR_ROWS);
+        }
+    };
 
     private static final Map<SchemaType, List<String>> COL_NAMES = new HashMap<SchemaType, List<String>>() {
 
@@ -181,19 +181,19 @@ public class SchemasPanel extends Panel {
                     final IColumn<AbstractSchemaTO, String> column =
                             new PropertyColumn<AbstractSchemaTO, String>(new ResourceModel(field), field, field) {
 
-                                private static final long serialVersionUID = 3282547854226892169L;
-
-                                @Override
-                                public String getCssClass() {
-                                    String css = super.getCssClass();
-                                    if ("key".equals(field)) {
-                                        css = StringUtils.isBlank(css)
-                                                ? "medium_fixedsize"
-                                                : css + " medium_fixedsize";
-                                    }
-                                    return css;
-                                }
-                            };
+                        private static final long serialVersionUID = 3282547854226892169L;
+
+                        @Override
+                        public String getCssClass() {
+                            String css = super.getCssClass();
+                            if ("key".equals(field)) {
+                                css = StringUtils.isBlank(css)
+                                        ? "medium_fixedsize"
+                                        : css + " medium_fixedsize";
+                            }
+                            return css;
+                        }
+                    };
                     columns.add(column);
                 }
             }
@@ -228,7 +228,8 @@ public class SchemasPanel extends Panel {
                         modal.show(true);
                         target.add(modal.setContent(new SchemaModalPanel(modal, pageReference, false)));
                     }
-                }, ActionLink.ActionType.EDIT, Entitlement.SCHEMA_UPDATE).addWithRoles(new ActionLink<Serializable>() {
+                }, ActionLink.ActionType.EDIT, StandardEntitlement.SCHEMA_UPDATE).addWithRoles(
+                        new ActionLink<Serializable>() {
 
                     private static final long serialVersionUID = -3722207913631435501L;
 
@@ -254,7 +255,7 @@ public class SchemasPanel extends Panel {
 
                         target.add(webContainer);
                     }
-                }, ActionLink.ActionType.DELETE, Entitlement.SCHEMA_DELETE);
+                }, ActionLink.ActionType.DELETE, StandardEntitlement.SCHEMA_DELETE);
 
                 item.add(actionLinks.build(componentId));
             }

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/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
index 26f638c..0cbe42a 100644
--- 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
@@ -43,6 +43,7 @@ import org.apache.syncope.common.lib.to.AnyTO;
 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;
@@ -58,118 +59,113 @@ public final class UserSearchResultPanel extends AnySearchResultPanel<UserTO> {
 
     private static final long serialVersionUID = -1100228004207271270L;
 
-    private final String entitlement = "USER_LIST";
-
     private UserSearchResultPanel(
             final String type,
             final String parentId,
             final boolean filtered,
             final String fiql,
             final PageReference callerRef,
-            final AbstractAnyRestClient restClient,
+            final AbstractAnyRestClient<UserTO> restClient,
             final List<AnyTypeClassTO> anyTypeClassTOs,
-            final String realm) {
+            final String realm,
+            final String entitlement) {
 
-        super(type, parentId, filtered, fiql, callerRef, restClient, anyTypeClassTOs, realm);
+        super(type, parentId, filtered, fiql, callerRef, restClient, anyTypeClassTOs, realm, entitlement);
     }
 
     @Override
-    protected List<IColumn<AnyTO, String>> getColumns() {
+    protected List<IColumn<UserTO, String>> getColumns() {
 
-        final List<IColumn<AnyTO, String>> columns = new ArrayList<IColumn<AnyTO, String>>();
+        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 PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
+                columns.add(new PropertyColumn<UserTO, String>(new ResourceModel(name, name), name, name));
             } else if (field != null && field.getType().equals(Date.class)) {
-                columns.add(new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
+                columns.add(new PropertyColumn<UserTO, String>(new ResourceModel(name, name), name, name));
             } else {
-                columns.add(new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
+                columns.add(new PropertyColumn<UserTO, String>(new ResourceModel(name, name), name, name));
             }
         }
 
         for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_ATTRIBUTES_VIEW)) {
             if (schemaNames.contains(name)) {
-                columns.add(new AttrColumn(name, SchemaType.PLAIN));
+                columns.add(new AttrColumn<UserTO>(name, SchemaType.PLAIN));
             }
         }
 
         for (String name : prefMan.getList(getRequest(), Constants.PREF_USERS_DERIVED_ATTRIBUTES_VIEW)) {
             if (dSchemaNames.contains(name)) {
-                columns.add(new AttrColumn(name, SchemaType.DERIVED));
+                columns.add(new AttrColumn<UserTO>(name, SchemaType.DERIVED));
             }
         }
 
         // Add defaults in case of no selection
         if (columns.isEmpty()) {
             for (String name : UserDisplayAttributesModalPage.USER_DEFAULT_SELECTION) {
-                columns.add(new PropertyColumn<AnyTO, String>(new ResourceModel(name, name), name, name));
+                columns.add(new PropertyColumn<UserTO, String>(new ResourceModel(name, name), name, name));
             }
 
             prefMan.setList(getRequest(), getResponse(), Constants.PREF_USERS_DETAILS_VIEW,
                     Arrays.asList(UserDisplayAttributesModalPage.USER_DEFAULT_SELECTION));
         }
 
-        columns.add(new ActionColumn<AnyTO, String>(new ResourceModel("actions", "")) {
+        columns.add(new ActionColumn<UserTO, String>(new ResourceModel("actions", "")) {
 
             private static final long serialVersionUID = -3503023501954863131L;
 
             @Override
-            public ActionLinksPanel<AnyTO> getActions(final String componentId, final IModel<AnyTO> model) {
+            public ActionLinksPanel<UserTO> getActions(final String componentId, final IModel<UserTO> model) {
 
-                final ActionLinksPanel.Builder<AnyTO> panel = ActionLinksPanel.builder(page.getPageReference());
+                final ActionLinksPanel.Builder<UserTO> panel = ActionLinksPanel.builder(page.getPageReference());
 
-                panel.add(new ActionLink<AnyTO>() {
+                panel.add(new ActionLink<UserTO>() {
 
                     private static final long serialVersionUID = -7978723352517770644L;
 
                     @Override
-                    public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
-                        final UserTO modelObject = UserTO.class.cast(model.getObject());
-
-                        final IModel<UserTO> model = new CompoundPropertyModel<>(modelObject);
+                    public void onClick(final AjaxRequestTarget target, final UserTO anyTO) {
+                        final IModel<UserTO> model = new CompoundPropertyModel<>(anyTO);
                         modal.setFormModel(model);
 
                         target.add(modal.setContent(
-                                new StatusModalPage<UserTO>(modal, page.getPageReference(), model.getObject())));
+                                new StatusModalPage<>(modal, page.getPageReference(), model.getObject())));
 
-                        modal.header(new Model<String>(MessageFormat.format(getString("any.edit"), anyTO.getKey())));
+                        modal.header(new Model<>(MessageFormat.format(getString("any.edit"), anyTO.getKey())));
                         modal.show(true);
                     }
-                }, ActionLink.ActionType.MANAGE_RESOURCES, entitlement).add(new ActionLink<AnyTO>() {
+                }, ActionLink.ActionType.MANAGE_RESOURCES, StandardEntitlement.USER_LIST).add(new ActionLink<UserTO>() {
 
                     private static final long serialVersionUID = -7978723352517770644L;
 
                     @Override
-                    public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
-                        final UserTO modelObject = UserTO.class.cast(model.getObject());
-
-                        final IModel<UserTO> model = new CompoundPropertyModel<>(modelObject);
+                    public void onClick(final AjaxRequestTarget target, final UserTO anyTO) {
+                        final IModel<UserTO> model = new CompoundPropertyModel<>(anyTO);
                         modal.setFormModel(model);
 
                         target.add(modal.setContent(
-                                new StatusModalPage<UserTO>(modal, page.getPageReference(), model.getObject(), true)));
+                                new StatusModalPage<>(modal, page.getPageReference(), model.getObject(), true)));
 
-                        modal.header(new Model<String>(MessageFormat.format(getString("any.edit"), anyTO.getKey())));
+                        modal.header(new Model<>(MessageFormat.format(getString("any.edit"), anyTO.getKey())));
                         modal.show(true);
                     }
-                }, ActionLink.ActionType.ENABLE, entitlement).add(new ActionLink<AnyTO>() {
+                }, ActionLink.ActionType.ENABLE, entitlement).add(new ActionLink<UserTO>() {
 
                     private static final long serialVersionUID = -7978723352517770644L;
 
                     @Override
-                    public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
+                    public void onClick(final AjaxRequestTarget target, final UserTO anyTO) {
                         send(UserSearchResultPanel.this, Broadcast.BREADTH,
                                 new AjaxWizard.NewItemActionEvent<AnyTO>(model.getObject(), target));
                     }
-                }, ActionLink.ActionType.EDIT, entitlement).add(new ActionLink<AnyTO>() {
+                }, ActionLink.ActionType.EDIT, entitlement).add(new ActionLink<UserTO>() {
 
                     private static final long serialVersionUID = -7978723352517770644L;
 
                     @Override
-                    public void onClick(final AjaxRequestTarget target, final AnyTO anyTO) {
+                    public void onClick(final AjaxRequestTarget target, final UserTO anyTO) {
                         try {
                             restClient.delete(model.getObject().getETagValue(), model.getObject().getKey());
                             info(getString(Constants.OPERATION_SUCCEEDED));
@@ -246,10 +242,11 @@ public final class UserSearchResultPanel extends AnySearchResultPanel<UserTO> {
                 final boolean filtered,
                 final String fiql,
                 final PageReference pageRef,
-                final AbstractAnyRestClient restClient,
+                final AbstractAnyRestClient<UserTO> restClient,
                 final List<AnyTypeClassTO> anyTypeClassTOs,
                 final String realm,
                 final String type) {
+
             super(UserTO.class, filtered, fiql, pageRef, restClient, realm, type);
             this.anyTypeClassTOs = anyTypeClassTOs;
         }
@@ -257,7 +254,8 @@ public final class UserSearchResultPanel extends AnySearchResultPanel<UserTO> {
         @Override
         protected WizardMgtPanel<UserTO> newInstance(final String parentId) {
             return new UserSearchResultPanel(
-                    type, parentId, filtered, fiql, pageRef, restClient, anyTypeClassTOs, realm);
+                    type, parentId, filtered, fiql, pageRef, restClient, anyTypeClassTOs, realm,
+                    StandardEntitlement.USER_LIST);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/rest/AbstractAnyRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/AbstractAnyRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/AbstractAnyRestClient.java
index c909aae..713418f 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/AbstractAnyRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/AbstractAnyRestClient.java
@@ -35,25 +35,24 @@ import org.apache.syncope.common.lib.types.ResourceDeassociationAction;
 import org.apache.syncope.common.rest.api.service.AnyService;
 import org.apache.wicket.extensions.markup.html.repeater.util.SortParam;
 
-public abstract class AbstractAnyRestClient extends BaseRestClient {
+public abstract class AbstractAnyRestClient<T extends AnyTO> extends BaseRestClient {
 
     private static final long serialVersionUID = 1962529678091410544L;
 
     public abstract int count(String realm);
 
-    public abstract List<? extends AnyTO> list(
-            String realm, int page, int size, final SortParam<String> sort, final String type);
+    public abstract List<T> list(String realm, int page, int size, final SortParam<String> sort, final String type);
 
     public abstract int searchCount(String realm, String fiql, final String type);
 
-    public abstract List<? extends AnyTO> search(
+    public abstract List<T> search(
             String realm, String fiql, int page, int size, final SortParam<String> sort, final String type);
 
     public abstract ConnObjectTO readConnObject(String resourceName, Long key);
 
-    public abstract <T extends AnyTO> ProvisioningResult<T> delete(String etag, Long key);
+    public abstract ProvisioningResult<T> delete(String etag, Long key);
 
-    protected <T extends AnyTO, E extends AnyService<T, ?>> ProvisioningResult<T> delete(
+    protected <E extends AnyService<T, ?>> ProvisioningResult<T> delete(
             final Class<E> serviceClass, final Class<T> objectType, final String etag, final Long key) {
         ProvisioningResult<T> result;
         synchronized (this) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyObjectRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyObjectRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyObjectRestClient.java
index ee3ff93..9296195 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyObjectRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/AnyObjectRestClient.java
@@ -38,7 +38,7 @@ import org.springframework.stereotype.Component;
  * Console client for invoking Rest any type class services.
  */
 @Component
-public class AnyObjectRestClient extends AbstractAnyRestClient {
+public class AnyObjectRestClient extends AbstractAnyRestClient<AnyObjectTO> {
 
     private static final long serialVersionUID = -8874495991295283249L;
 
@@ -54,8 +54,9 @@ public class AnyObjectRestClient extends AbstractAnyRestClient {
     }
 
     @Override
-    public List<? extends AnyTO> list(final String realm, final int page, final int size, final SortParam<String> sort,
+    public List<AnyObjectTO> list(final String realm, final int page, final int size, final SortParam<String> sort,
             final String type) {
+
         return list(type, realm).getResult();
     }
 
@@ -70,9 +71,10 @@ public class AnyObjectRestClient extends AbstractAnyRestClient {
     }
 
     @Override
-    public List<? extends AnyTO> search(final String realm, final String fiql, final int page, final int size,
+    public List<AnyObjectTO> search(final String realm, final String fiql, final int page, final int size,
             final SortParam<String> sort,
             final String type) {
+
         throw new UnsupportedOperationException("Not supported yet.");
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
index 1226199..fe7c7e7 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/GroupRestClient.java
@@ -40,7 +40,7 @@ import org.springframework.stereotype.Component;
  * Console client for invoking Rest Group's services.
  */
 @Component
-public class GroupRestClient extends AbstractAnyRestClient {
+public class GroupRestClient extends AbstractAnyRestClient<GroupTO> {
 
     private static final long serialVersionUID = -8549081557283519638L;
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fcf293/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
index d665f83..4830ed0 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/UserRestClient.java
@@ -44,7 +44,7 @@ import org.springframework.stereotype.Component;
  * Console client for invoking rest users services.
  */
 @Component
-public class UserRestClient extends AbstractAnyRestClient {
+public class UserRestClient extends AbstractAnyRestClient<UserTO> {
 
     private static final long serialVersionUID = -1575748964398293968L;
 


Mime
View raw message