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 2015/05/25 16:50:39 UTC

[03/29] syncope git commit: [SYNCOPE-666] Initial commit, Travis CI builds disabled

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutePanel.java
----------------------------------------------------------------------
diff --git a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutePanel.java b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutePanel.java
index eb3effe..005e23f 100644
--- a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutePanel.java
+++ b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/panels/CamelRoutePanel.java
@@ -26,8 +26,8 @@ import org.apache.syncope.client.console.annotations.ExtensionPanel;
 import org.apache.syncope.client.console.commons.SortableDataProviderComparator;
 import org.apache.syncope.client.console.rest.CamelRouteRestClient;
 import org.apache.syncope.common.lib.to.CamelRouteTO;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.common.lib.types.Entitlement;
-import org.apache.syncope.common.lib.types.SubjectType;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
@@ -85,32 +85,33 @@ public class CamelRoutePanel extends AbstractExtensionPanel {
                     final IModel<CamelRouteTO> model) {
 
                 // Uncomment with something similar once SYNCOPE-156 is completed
-                /*final ActionLinksPanel panel = new ActionLinksPanel(componentId, model, pageref);
-
-                panel.add(new ActionLink() {
-
-                    private static final long serialVersionUID = -3722207913631435501L;
-
-                    @Override
-                    public void onClick(final AjaxRequestTarget target) {
-
-                        editCamelRouteWin.setPageCreator(new ModalWindow.PageCreator() {
-
-                            private static final long serialVersionUID = -7834632442532690940L;
-
-                            @Override
-                            public Page createPage() {
-                                return new CamelRouteModalPage(pageref, editCamelRouteWin,
-                                        restClient.read(model.getObject().getKey()), false);
-                            }
-
-                        });
-
-                        editCamelRouteWin.show(target);
-                    }
-                }, ActionLink.ActionType.EDIT, "CamelRoutes");
-
-                cellItem.add(panel);*/
+                /* final ActionLinksPanel panel = new
+                 * ActionLinksPanel(componentId, model, pageref);
+                 *
+                 * panel.add(new ActionLink() {
+                 *
+                 * private static final long serialVersionUID = -3722207913631435501L;
+                 *
+                 * @Override
+                 * public void onClick(final AjaxRequestTarget target) {
+                 *
+                 * editCamelRouteWin.setPageCreator(new ModalWindow.PageCreator() {
+                 *
+                 * private static final long serialVersionUID = -7834632442532690940L;
+                 *
+                 * @Override
+                 * public Page createPage() {
+                 * return new CamelRouteModalPage(pageref, editCamelRouteWin,
+                 * restClient.read(model.getObject().getKey()), false);
+                 * }
+                 *
+                 * });
+                 *
+                 * editCamelRouteWin.show(target);
+                 * }
+                 * }, ActionLink.ActionType.EDIT, "CamelRoutes");
+                 *
+                 * cellItem.add(panel); */
             }
         });
 
@@ -138,11 +139,11 @@ public class CamelRoutePanel extends AbstractExtensionPanel {
         @Override
         public Iterator<? extends CamelRouteTO> iterator(final long first, final long count) {
             List<CamelRouteTO> list = new ArrayList<>();
-            if (restClient.isCamelEnabledFor(SubjectType.USER)) {
-                list.addAll(restClient.list(SubjectType.USER));
+            if (restClient.isCamelEnabledFor(AnyTypeKind.USER)) {
+                list.addAll(restClient.list(AnyTypeKind.USER));
             }
-            if (restClient.isCamelEnabledFor(SubjectType.GROUP)) {
-                list.addAll(restClient.list(SubjectType.GROUP));
+            if (restClient.isCamelEnabledFor(AnyTypeKind.GROUP)) {
+                list.addAll(restClient.list(AnyTypeKind.GROUP));
             }
 
             Collections.sort(list, comparator);
@@ -152,11 +153,11 @@ public class CamelRoutePanel extends AbstractExtensionPanel {
 
         @Override
         public long size() {
-            return (restClient.isCamelEnabledFor(SubjectType.USER)
-                    ? restClient.list(SubjectType.USER).size()
+            return (restClient.isCamelEnabledFor(AnyTypeKind.USER)
+                    ? restClient.list(AnyTypeKind.USER).size()
                     : 0)
-                    + (restClient.isCamelEnabledFor(SubjectType.GROUP)
-                            ? restClient.list(SubjectType.GROUP).size()
+                    + (restClient.isCamelEnabledFor(AnyTypeKind.GROUP)
+                            ? restClient.list(AnyTypeKind.GROUP).size()
                             : 0);
         }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRouteRestClient.java
----------------------------------------------------------------------
diff --git a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRouteRestClient.java b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRouteRestClient.java
index f742abb..a4e3a5d 100644
--- a/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRouteRestClient.java
+++ b/ext/camel/client-console/src/main/java/org/apache/syncope/client/console/rest/CamelRouteRestClient.java
@@ -21,7 +21,7 @@ package org.apache.syncope.client.console.rest;
 import java.util.List;
 import org.apache.syncope.client.console.SyncopeConsoleSession;
 import org.apache.syncope.common.lib.to.CamelRouteTO;
-import org.apache.syncope.common.lib.types.SubjectType;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.common.rest.api.service.CamelRouteService;
 import org.springframework.stereotype.Component;
 
@@ -30,8 +30,8 @@ public class CamelRouteRestClient extends BaseRestClient {
 
     private static final long serialVersionUID = -2018208424159468912L;
 
-    public List<CamelRouteTO> list(final SubjectType subject) {
-        return getService(CamelRouteService.class).list(subject);
+    public List<CamelRouteTO> list(final AnyTypeKind anyTypeKind) {
+        return getService(CamelRouteService.class).list(anyTypeKind);
     }
 
     public CamelRouteTO read(final String key) {
@@ -44,10 +44,15 @@ public class CamelRouteRestClient extends BaseRestClient {
         getService(CamelRouteService.class).update(key, routeTO);
     }
 
-    public boolean isCamelEnabledFor(final SubjectType subjectType) {
-        return subjectType == SubjectType.USER
-                ? SyncopeConsoleSession.get().getSyncopeTO().getUserProvisioningManager().contains("Camel")
-                : SyncopeConsoleSession.get().getSyncopeTO().getGroupProvisioningManager().contains("Camel");
+    public boolean isCamelEnabledFor(final AnyTypeKind anyTypeKind) {
+        return anyTypeKind == AnyTypeKind.USER
+                ? SyncopeConsoleSession.get().getSyncopeTO().
+                getUserProvisioningManager().contains("Camel")
+                : anyTypeKind == AnyTypeKind.ANY_OBJECT
+                        ? SyncopeConsoleSession.get().getSyncopeTO().
+                        getAnyObjectProvisioningManager().contains("Camel")
+                        : SyncopeConsoleSession.get().getSyncopeTO().
+                        getGroupProvisioningManager().contains("Camel");
 
     }
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/to/CamelRouteTO.java
----------------------------------------------------------------------
diff --git a/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/to/CamelRouteTO.java b/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/to/CamelRouteTO.java
index 5572336..7148de1 100644
--- a/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/to/CamelRouteTO.java
+++ b/ext/camel/common-lib/src/main/java/org/apache/syncope/common/lib/to/CamelRouteTO.java
@@ -21,15 +21,17 @@ package org.apache.syncope.common.lib.to;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.AbstractBaseBean;
-import org.apache.syncope.common.lib.types.SubjectType;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
 
 @XmlRootElement(name = "camelRoute")
 @XmlType
 public class CamelRouteTO extends AbstractBaseBean {
 
+    private static final long serialVersionUID = 6431992877435181674L;
+
     private String name;
 
-    private SubjectType subjectType;
+    private AnyTypeKind anyTypeKind;
 
     private String content;
 
@@ -49,12 +51,12 @@ public class CamelRouteTO extends AbstractBaseBean {
         this.content = content;
     }
 
-    public SubjectType getSubjectType() {
-        return subjectType;
+    public AnyTypeKind getAnyTypeKind() {
+        return anyTypeKind;
     }
 
-    public void setSubjectType(final SubjectType subjectType) {
-        this.subjectType = subjectType;
+    public void setAnyTypeKind(final AnyTypeKind anyTypeKind) {
+        this.anyTypeKind = anyTypeKind;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/CamelRouteLogic.java
----------------------------------------------------------------------
diff --git a/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/CamelRouteLogic.java b/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/CamelRouteLogic.java
index 19437ab..ec25e29 100644
--- a/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/CamelRouteLogic.java
+++ b/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/CamelRouteLogic.java
@@ -23,8 +23,8 @@ import java.util.ArrayList;
 import java.util.List;
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.syncope.common.lib.to.CamelRouteTO;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.common.lib.types.Entitlement;
-import org.apache.syncope.common.lib.types.SubjectType;
 import org.apache.syncope.core.persistence.api.dao.CamelRouteDAO;
 import org.apache.syncope.core.persistence.api.dao.NotFoundException;
 import org.apache.syncope.core.persistence.api.entity.CamelRoute;
@@ -49,10 +49,10 @@ public class CamelRouteLogic extends AbstractTransactionalLogic<CamelRouteTO> {
 
     @PreAuthorize("hasRole('" + Entitlement.ROUTE_LIST + "')")
     @Transactional(readOnly = true)
-    public List<CamelRouteTO> list(final SubjectType subjectType) {
+    public List<CamelRouteTO> list(final AnyTypeKind anyTypeKind) {
         List<CamelRouteTO> routes = new ArrayList<>();
 
-        for (CamelRoute route : routeDAO.find(subjectType)) {
+        for (CamelRoute route : routeDAO.find(anyTypeKind)) {
             routes.add(binder.getRouteTO(route));
         }
         return routes;

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/init/CamelRouteLoader.java
----------------------------------------------------------------------
diff --git a/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/init/CamelRouteLoader.java b/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/init/CamelRouteLoader.java
index 8134eb0..e13018f 100644
--- a/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/init/CamelRouteLoader.java
+++ b/ext/camel/logic/src/main/java/org/apache/syncope/core/logic/init/CamelRouteLoader.java
@@ -22,7 +22,7 @@ import java.io.StringWriter;
 import java.util.List;
 import java.util.Map;
 import javax.sql.DataSource;
-import org.apache.syncope.common.lib.types.SubjectType;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.core.misc.spring.ResourceWithFallbackLoader;
 import org.apache.syncope.core.persistence.api.SyncopeLoader;
 import org.apache.syncope.core.persistence.api.entity.CamelEntityFactory;
@@ -73,17 +73,18 @@ public class CamelRouteLoader implements SyncopeLoader {
     public void load() {
         synchronized (this) {
             if (!loaded) {
-                loadRoutes(userRoutesLoader.getResource(), SubjectType.USER);
-                loadRoutes(groupRoutesLoader.getResource(), SubjectType.GROUP);
+                loadRoutes(userRoutesLoader.getResource(), AnyTypeKind.USER);
+                loadRoutes(groupRoutesLoader.getResource(), AnyTypeKind.GROUP);
+                loadRoutes(groupRoutesLoader.getResource(), AnyTypeKind.ANY_OBJECT);
                 loaded = true;
             }
         }
     }
 
-    private boolean loadRoutesFor(final SubjectType subject) {
+    private boolean loadRoutesFor(final AnyTypeKind anyTypeKind) {
         final String sql = String.format("SELECT * FROM %s WHERE SUBJECTTYPE = ?", CamelRoute.class.getSimpleName());
         final JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
-        final List<Map<String, Object>> rows = jdbcTemplate.queryForList(sql, new Object[] { subject.name() });
+        final List<Map<String, Object>> rows = jdbcTemplate.queryForList(sql, new Object[] { anyTypeKind.name() });
         return rows.isEmpty();
     }
 
@@ -101,8 +102,8 @@ public class CamelRouteLoader implements SyncopeLoader {
         return writer.toString();
     }
 
-    private void loadRoutes(final Resource resource, final SubjectType subjectType) {
-        if (loadRoutesFor(subjectType)) {
+    private void loadRoutes(final Resource resource, final AnyTypeKind anyTypeKind) {
+        if (loadRoutesFor(anyTypeKind)) {
             String query = String.format("INSERT INTO %s(NAME, SUBJECTTYPE, CONTENT) VALUES (?, ?, ?)",
                     CamelRoute.class.getSimpleName());
             JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
@@ -122,11 +123,11 @@ public class CamelRouteLoader implements SyncopeLoader {
                     String routeId = ((Element) routeElement).getAttribute("id");
 
                     CamelRoute route = entityFactory.newCamelRoute();
-                    route.setSubjectType(subjectType);
+                    route.setAnyTypeKind(anyTypeKind);
                     route.setKey(routeId);
                     route.setContent(routeContent);
 
-                    jdbcTemplate.update(query, new Object[] { routeId, subjectType.name(), routeContent });
+                    jdbcTemplate.update(query, new Object[] { routeId, anyTypeKind.name(), routeContent });
                     LOG.info("Route successfully loaded: {}", routeId);
                 }
             } catch (DataAccessException e) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/CamelRouteDAO.java
----------------------------------------------------------------------
diff --git a/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/CamelRouteDAO.java b/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/CamelRouteDAO.java
index cbafcb4..8162bde 100644
--- a/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/CamelRouteDAO.java
+++ b/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/CamelRouteDAO.java
@@ -19,14 +19,14 @@
 package org.apache.syncope.core.persistence.api.dao;
 
 import java.util.List;
-import org.apache.syncope.common.lib.types.SubjectType;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.core.persistence.api.entity.CamelRoute;
 
 public interface CamelRouteDAO extends DAO<CamelRoute, String> {
 
     CamelRoute find(String key);
 
-    List<CamelRoute> find(SubjectType subjectType);
+    List<CamelRoute> find(AnyTypeKind anyTypeKind);
 
     List<CamelRoute> findAll();
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/CamelRoute.java
----------------------------------------------------------------------
diff --git a/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/CamelRoute.java b/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/CamelRoute.java
index ef01fbd..5e25c68 100644
--- a/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/CamelRoute.java
+++ b/ext/camel/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/CamelRoute.java
@@ -18,17 +18,18 @@
  */
 package org.apache.syncope.core.persistence.api.entity;
 
-import org.apache.syncope.common.lib.types.SubjectType;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
 
 public interface CamelRoute extends Entity<String> {
 
-    String getContent();
+    void setKey(String name);
 
-    SubjectType getSubjectType();
+    AnyTypeKind getAnyTypeKind();
 
-    void setKey(String name);
+    void setAnyTypeKind(AnyTypeKind anyTypeKind);
+
+    String getContent();
 
     void setContent(String routeContent);
 
-    void setSubjectType(SubjectType subject);
 }

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPACamelRouteDAO.java
----------------------------------------------------------------------
diff --git a/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPACamelRouteDAO.java b/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPACamelRouteDAO.java
index 6137015..e9f2c72 100644
--- a/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPACamelRouteDAO.java
+++ b/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPACamelRouteDAO.java
@@ -20,7 +20,7 @@ package org.apache.syncope.core.persistence.jpa.dao;
 
 import java.util.List;
 import javax.persistence.TypedQuery;
-import org.apache.syncope.common.lib.types.SubjectType;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.core.persistence.api.dao.CamelRouteDAO;
 import org.apache.syncope.core.persistence.api.entity.CamelRoute;
 import org.apache.syncope.core.persistence.jpa.entity.JPACamelRoute;
@@ -37,11 +37,11 @@ public class JPACamelRouteDAO extends AbstractDAO<CamelRoute, String> implements
 
     @Transactional(readOnly = true)
     @Override
-    public List<CamelRoute> find(final SubjectType subjectType) {
+    public List<CamelRoute> find(final AnyTypeKind anyTypeKind) {
         TypedQuery<CamelRoute> query = entityManager.createQuery(
                 "SELECT e FROM " + JPACamelRoute.class.getSimpleName()
-                + " e WHERE e.subjectType = :subjectType", CamelRoute.class);
-        query.setParameter("subjectType", subjectType);
+                + " e WHERE e.anyTypeKind = :anyTypeKind", CamelRoute.class);
+        query.setParameter("anyTypeKind", anyTypeKind);
 
         return query.getResultList();
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPACamelRoute.java
----------------------------------------------------------------------
diff --git a/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPACamelRoute.java b/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPACamelRoute.java
index 38803e5..b4ab959 100644
--- a/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPACamelRoute.java
+++ b/ext/camel/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPACamelRoute.java
@@ -25,7 +25,7 @@ import javax.persistence.EnumType;
 import javax.persistence.Enumerated;
 import javax.persistence.Table;
 import javax.validation.constraints.NotNull;
-import org.apache.syncope.common.lib.types.SubjectType;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.core.persistence.api.entity.CamelRoute;
 
 @Entity
@@ -41,7 +41,7 @@ public class JPACamelRoute extends AbstractEntity<String> implements CamelRoute
 
     @NotNull
     @Enumerated(EnumType.STRING)
-    private SubjectType subjectType;
+    private AnyTypeKind anyTypeKind;
 
     @Lob
     private String content;
@@ -57,13 +57,13 @@ public class JPACamelRoute extends AbstractEntity<String> implements CamelRoute
     }
 
     @Override
-    public SubjectType getSubjectType() {
-        return subjectType;
+    public AnyTypeKind getAnyTypeKind() {
+        return anyTypeKind;
     }
 
     @Override
-    public void setSubjectType(final SubjectType subjectType) {
-        this.subjectType = subjectType;
+    public void setAnyTypeKind(final AnyTypeKind anyTypeKind) {
+        this.anyTypeKind = anyTypeKind;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelUserProvisioningManager.java
----------------------------------------------------------------------
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelUserProvisioningManager.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelUserProvisioningManager.java
index 4c04147..5b20fa1 100644
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelUserProvisioningManager.java
+++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/CamelUserProvisioningManager.java
@@ -81,18 +81,9 @@ public class CamelUserProvisioningManager extends AbstractCamelProvisioningManag
 
     @Override
     public Pair<Long, List<PropagationStatus>> update(final UserMod userMod) {
-        return update(userMod, false);
-    }
-
-    @Override
-    @SuppressWarnings("unchecked")
-    public Pair<Long, List<PropagationStatus>> update(final UserMod userMod, final boolean removeMemberships) {
         PollingConsumer pollingConsumer = getConsumer("direct:updatePort");
 
-        Map<String, Object> props = new HashMap<>();
-        props.put("removeMemberships", removeMemberships);
-
-        sendMessage("direct:updateUser", userMod, props);
+        sendMessage("direct:updateUser", userMod);
 
         Exchange exchange = pollingConsumer.receive();
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/GroupDeleteProcessor.java
----------------------------------------------------------------------
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/GroupDeleteProcessor.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/GroupDeleteProcessor.java
index 0aca43b..212cccd 100644
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/GroupDeleteProcessor.java
+++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/GroupDeleteProcessor.java
@@ -68,7 +68,7 @@ public class GroupDeleteProcessor implements Processor {
             // Generate propagation tasks for deleting users from group resources, if they are on those resources only
             // because of the reason being deleted (see SYNCOPE-357)
             for (Map.Entry<Long, PropagationByResource> entry
-                    : groupDAO.findUsersWithIndirectResources(group.getKey()).entrySet()) {
+                    : groupDAO.findAnyObjectsWithTransitiveResources(group.getKey()).entrySet()) {
 
                 WorkflowResult<Long> wfResult =
                         new WorkflowResult<>(entry.getKey(), entry.getValue(), Collections.<String>emptySet());

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/GroupDeprovisionProcessor.java
----------------------------------------------------------------------
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/GroupDeprovisionProcessor.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/GroupDeprovisionProcessor.java
index f27a113..5b21325 100644
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/GroupDeprovisionProcessor.java
+++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/GroupDeprovisionProcessor.java
@@ -57,7 +57,7 @@ public class GroupDeprovisionProcessor implements Processor {
         Long groupKey = exchange.getIn().getBody(Long.class);
         List<String> resources = exchange.getProperty("resources", List.class);
 
-        Group group = groupDAO.authFetch(groupKey);
+        Group group = groupDAO.authFind(groupKey);
 
         Collection<String> noPropResourceNames = CollectionUtils.removeAll(group.getResourceNames(), resources);
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/UserCreateProcessor.java
----------------------------------------------------------------------
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/UserCreateProcessor.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/UserCreateProcessor.java
index 9f6804e..791a32a 100644
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/UserCreateProcessor.java
+++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/UserCreateProcessor.java
@@ -63,7 +63,6 @@ public class UserCreateProcessor implements Processor {
                     created.getPropByRes(),
                     actual.getPassword(),
                     actual.getVirAttrs(),
-                    actual.getMemberships(),
                     excludedResources);
             PropagationReporter propagationReporter =
                     ApplicationContextProvider.getApplicationContext().getBean(PropagationReporter.class);

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/UserDeprovisionProcessor.java
----------------------------------------------------------------------
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/UserDeprovisionProcessor.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/UserDeprovisionProcessor.java
index 031e451..3060569 100644
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/UserDeprovisionProcessor.java
+++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/UserDeprovisionProcessor.java
@@ -56,7 +56,7 @@ public class UserDeprovisionProcessor implements Processor {
         @SuppressWarnings("unchecked")
         List<String> resources = exchange.getProperty("resources", List.class);
 
-        User user = userDAO.authFetch(userKey);
+        User user = userDAO.authFind(userKey);
 
         List<PropagationTask> tasks = propagationManager.getUserDeleteTasks(
                 userKey,

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/UserUpdateProcessor.java
----------------------------------------------------------------------
diff --git a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/UserUpdateProcessor.java b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/UserUpdateProcessor.java
index 84f8a2d..355080b 100644
--- a/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/UserUpdateProcessor.java
+++ b/ext/camel/provisioning-camel/src/main/java/org/apache/syncope/core/provisioning/camel/processor/UserUpdateProcessor.java
@@ -24,7 +24,6 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.apache.commons.lang3.tuple.Pair;
-import org.apache.syncope.common.lib.mod.MembershipMod;
 import org.apache.syncope.common.lib.mod.UserMod;
 import org.apache.syncope.common.lib.types.PropagationByResource;
 import org.apache.syncope.core.misc.spring.ApplicationContextProvider;
@@ -59,7 +58,6 @@ public class UserUpdateProcessor implements Processor {
     public void process(final Exchange exchange) {
         WorkflowResult<Pair<UserMod, Boolean>> updated = (WorkflowResult) exchange.getIn().getBody();
         UserMod actual = exchange.getProperty("actual", UserMod.class);
-        boolean removeMemberships = exchange.getProperty("removeMemberships", boolean.class);
 
         List<PropagationTask> tasks = propagationManager.getUserUpdateTasks(updated);
         if (tasks.isEmpty()) {
@@ -68,22 +66,7 @@ public class UserUpdateProcessor implements Processor {
                     updated.getResult().getKey().getKey(),
                     actual.getVirAttrsToRemove(),
                     actual.getVirAttrsToUpdate());
-            // SYNCOPE-501: update only virtual attributes (if any of them changed), password propagation is
-            // not required, take care also of membership virtual attributes
-            boolean addOrUpdateMemberships = false;
-            for (MembershipMod membershipMod : actual.getMembershipsToAdd()) {
-                if (!virtAttrHandler.fillMembershipVirtual(
-                        updated.getResult().getKey().getKey(),
-                        membershipMod.getGroup(),
-                        null,
-                        membershipMod.getVirAttrsToRemove(),
-                        membershipMod.getVirAttrsToUpdate(),
-                        false).isEmpty()) {
-
-                    addOrUpdateMemberships = true;
-                }
-            }
-            tasks.addAll(!propByResVirAttr.isEmpty() || addOrUpdateMemberships || removeMemberships
+            tasks.addAll(!propByResVirAttr.isEmpty()
                     ? propagationManager.getUserUpdateTasks(updated, false, null)
                     : Collections.<PropagationTask>emptyList());
         }

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
----------------------------------------------------------------------
diff --git a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java b/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
index 3a282b3..5d844df 100644
--- a/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
+++ b/ext/camel/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/CamelRouteService.java
@@ -30,14 +30,14 @@ import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import org.apache.syncope.common.lib.to.CamelRouteTO;
-import org.apache.syncope.common.lib.types.SubjectType;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
 
 @Path("camelRoutes")
 public interface CamelRouteService extends JAXRSService {
 
     @GET
     @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
-    List<CamelRouteTO> list(@NotNull @MatrixParam("subjectType") SubjectType subjectType);
+    List<CamelRouteTO> list(@NotNull @MatrixParam("anyTypeKind") AnyTypeKind anyTypeKind);
 
     @GET
     @Path("{key}")

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
----------------------------------------------------------------------
diff --git a/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java b/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
index a128e06..6853e2b 100644
--- a/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
+++ b/ext/camel/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/CamelRouteServiceImpl.java
@@ -20,7 +20,7 @@ package org.apache.syncope.core.rest.cxf.service;
 
 import java.util.List;
 import org.apache.syncope.common.lib.to.CamelRouteTO;
-import org.apache.syncope.common.lib.types.SubjectType;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.common.rest.api.service.CamelRouteService;
 import org.apache.syncope.core.logic.CamelRouteLogic;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -33,8 +33,8 @@ public class CamelRouteServiceImpl extends AbstractServiceImpl implements CamelR
     private CamelRouteLogic logic;
 
     @Override
-    public List<CamelRouteTO> list(final SubjectType subjectType) {
-        return logic.list(subjectType);
+    public List<CamelRouteTO> list(final AnyTypeKind anyTypeKind) {
+        return logic.list(anyTypeKind);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/DoubleValueAttributableTransformer.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/DoubleValueAttributableTransformer.java b/fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/DoubleValueAttributableTransformer.java
index 65f84b8..ec5d437 100644
--- a/fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/DoubleValueAttributableTransformer.java
+++ b/fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/DoubleValueAttributableTransformer.java
@@ -20,21 +20,21 @@ package org.apache.syncope.fit.core.reference;
 
 import java.util.ArrayList;
 import java.util.List;
-import org.apache.syncope.common.lib.mod.AbstractAttributableMod;
+import org.apache.syncope.common.lib.mod.AnyMod;
 import org.apache.syncope.common.lib.mod.AttrMod;
-import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.AnyTO;
 import org.apache.syncope.common.lib.to.AttrTO;
-import org.apache.syncope.core.provisioning.api.AttributableTransformer;
+import org.apache.syncope.core.provisioning.api.AnyTransformer;
 
 /**
  * Class for integration tests: transform (by making it double) any attribute value for defined schema.
  */
-public class DoubleValueAttributableTransformer implements AttributableTransformer {
+public class DoubleValueAttributableTransformer implements AnyTransformer {
 
     private static final String NAME = "makeItDouble";
 
     @Override
-    public <T extends AbstractAttributableTO> T transform(final T input) {
+    public <T extends AnyTO> T transform(final T input) {
         for (AttrTO attr : input.getPlainAttrs()) {
             if (NAME.equals(attr.getSchema())) {
                 List<String> values = new ArrayList<>(attr.getValues().size());
@@ -54,7 +54,7 @@ public class DoubleValueAttributableTransformer implements AttributableTransform
     }
 
     @Override
-    public <T extends AbstractAttributableMod> T transform(final T input) {
+    public <T extends AnyMod> T transform(final T input) {
         for (AttrMod attr : input.getPlainAttrsToUpdate()) {
             if (NAME.equals(attr.getSchema())) {
                 List<String> values = new ArrayList<>(attr.getValuesToBeAdded().size());

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/TestSyncActions.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/TestSyncActions.java b/fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/TestSyncActions.java
index bc4d407..9e37c09 100644
--- a/fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/TestSyncActions.java
+++ b/fit/core-reference/src/main/java/org/apache/syncope/fit/core/reference/TestSyncActions.java
@@ -19,9 +19,9 @@
 package org.apache.syncope.fit.core.reference;
 
 import org.apache.commons.collections4.CollectionUtils;
-import org.apache.syncope.common.lib.mod.AbstractSubjectMod;
+import org.apache.syncope.common.lib.mod.AnyMod;
 import org.apache.syncope.common.lib.mod.AttrMod;
-import org.apache.syncope.common.lib.to.AbstractSubjectTO;
+import org.apache.syncope.common.lib.to.AnyTO;
 import org.apache.syncope.common.lib.to.AttrTO;
 import org.apache.syncope.common.lib.to.UserTO;
 import org.apache.syncope.core.provisioning.api.sync.IgnoreProvisionException;
@@ -38,7 +38,7 @@ public class TestSyncActions extends DefaultSyncActions {
     private int counter = 0;
 
     @Override
-    public <T extends AbstractSubjectTO> SyncDelta beforeProvision(
+    public <T extends AnyTO> SyncDelta beforeProvision(
             final ProvisioningProfile<?, ?> profile, final SyncDelta delta, final T subject)
             throws JobExecutionException {
 
@@ -61,7 +61,7 @@ public class TestSyncActions extends DefaultSyncActions {
     }
 
     @Override
-    public <T extends AbstractSubjectTO> SyncDelta beforeAssign(
+    public <T extends AnyTO> SyncDelta beforeAssign(
             final ProvisioningProfile<?, ?> profile, final SyncDelta delta, final T subject)
             throws JobExecutionException {
 
@@ -73,7 +73,7 @@ public class TestSyncActions extends DefaultSyncActions {
     }
 
     @Override
-    public <T extends AbstractSubjectTO, K extends AbstractSubjectMod> SyncDelta beforeUpdate(
+    public <T extends AnyTO, K extends AnyMod> SyncDelta beforeUpdate(
             final ProvisioningProfile<?, ?> profile,
             final SyncDelta delta,
             final T subject,

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractITCase.java
index 07882b4..3984c5e 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AbstractITCase.java
@@ -45,7 +45,6 @@ import org.apache.syncope.common.lib.to.ResourceTO;
 import org.apache.syncope.common.lib.to.GroupTO;
 import org.apache.syncope.common.lib.to.RoleTO;
 import org.apache.syncope.common.lib.to.UserTO;
-import org.apache.syncope.common.lib.types.AttributableType;
 import org.apache.syncope.common.lib.types.ConnConfProperty;
 import org.apache.syncope.common.lib.types.SchemaType;
 import org.apache.syncope.common.rest.api.RESTHeaders;
@@ -292,10 +291,8 @@ public abstract class AbstractITCase {
     }
 
     @SuppressWarnings("unchecked")
-    protected <T extends AbstractSchemaTO> T createSchema(final AttributableType kind,
-            final SchemaType type, final T schemaTO) {
-
-        Response response = schemaService.create(kind, type, schemaTO);
+    protected <T extends AbstractSchemaTO> T createSchema(final SchemaType type, final T schemaTO) {
+        Response response = schemaService.create(type, schemaTO);
         if (response.getStatusInfo().getStatusCode() != Response.Status.CREATED.getStatusCode()) {
             Exception ex = clientFactory.getExceptionMapper().fromResponse(response);
             if (ex != null) {

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AuthenticationITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AuthenticationITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AuthenticationITCase.java
index 953d437..019c1c8 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AuthenticationITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/AuthenticationITCase.java
@@ -46,7 +46,6 @@ import org.apache.syncope.common.lib.to.UserTO;
 import org.apache.syncope.common.lib.to.WorkflowFormPropertyTO;
 import org.apache.syncope.common.lib.to.WorkflowFormTO;
 import org.apache.syncope.common.lib.types.AttrSchemaType;
-import org.apache.syncope.common.lib.types.AttributableType;
 import org.apache.syncope.common.lib.types.CipherAlgorithm;
 import org.apache.syncope.common.lib.types.ClientExceptionType;
 import org.apache.syncope.common.lib.types.Entitlement;
@@ -130,7 +129,7 @@ public class AuthenticationITCase extends AbstractITCase {
         schemaTO.setMandatoryCondition("false");
         schemaTO.setType(AttrSchemaType.String);
 
-        PlainSchemaTO newPlainSchemaTO = createSchema(AttributableType.USER, SchemaType.PLAIN, schemaTO);
+        PlainSchemaTO newPlainSchemaTO = createSchema(SchemaType.PLAIN, schemaTO);
         assertEquals(schemaTO, newPlainSchemaTO);
 
         // 2. create an user with the role created above (as admin)
@@ -141,18 +140,18 @@ public class AuthenticationITCase extends AbstractITCase {
         assertNotNull(userTO);
 
         // 3. read the schema created above (as admin) - success
-        schemaTO = schemaService.read(AttributableType.USER, SchemaType.PLAIN, schemaName);
+        schemaTO = schemaService.read(SchemaType.PLAIN, schemaName);
         assertNotNull(schemaTO);
 
         // 4. read the schema created above (as user) - success
         SchemaService schemaService2 = clientFactory.create(userTO.getUsername(), "password123").
                 getService(SchemaService.class);
-        schemaTO = schemaService2.read(AttributableType.USER, SchemaType.PLAIN, schemaName);
+        schemaTO = schemaService2.read(SchemaType.PLAIN, schemaName);
         assertNotNull(schemaTO);
 
         // 5. update the schema create above (as user) - failure
         try {
-            schemaService2.update(AttributableType.GROUP, SchemaType.PLAIN, schemaName, schemaTO);
+            schemaService2.update(SchemaType.PLAIN, schemaName, schemaTO);
             fail("Schemaupdate as user should not work");
         } catch (AccessControlException e) {
             // CXF Service will throw this exception
@@ -298,7 +297,7 @@ public class AuthenticationITCase extends AbstractITCase {
         // 1. create user with group 9 (users with group 9 are defined in workflow as subject to approval)
         UserTO userTO = UserITCase.getUniqueSampleTO("createWithReject@syncope.apache.org");
         MembershipTO membershipTO = new MembershipTO();
-        membershipTO.setGroupKey(9L);
+        membershipTO.setRightKey(9L);
         userTO.getMemberships().add(membershipTO);
 
         userTO = createUser(userTO);

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CamelRouteITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CamelRouteITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CamelRouteITCase.java
index 4681834..fcb988b 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CamelRouteITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CamelRouteITCase.java
@@ -27,10 +27,9 @@ import org.apache.syncope.common.lib.SyncopeConstants;
 import org.apache.syncope.common.lib.to.CamelRouteTO;
 import org.apache.syncope.common.lib.to.PlainSchemaTO;
 import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.common.lib.types.AttrSchemaType;
-import org.apache.syncope.common.lib.types.AttributableType;
 import org.apache.syncope.common.lib.types.SchemaType;
-import org.apache.syncope.common.lib.types.SubjectType;
 import org.junit.Assume;
 import org.junit.FixMethodOrder;
 import org.junit.Test;
@@ -43,7 +42,7 @@ public class CamelRouteITCase extends AbstractITCase {
     public void userRoutes() {
         Assume.assumeTrue(CamelDetector.isCamelEnabledForUsers(syncopeService));
 
-        List<CamelRouteTO> userRoutes = camelRouteService.list(SubjectType.USER);
+        List<CamelRouteTO> userRoutes = camelRouteService.list(AnyTypeKind.USER);
         assertNotNull(userRoutes);
         assertEquals(15, userRoutes.size());
         for (CamelRouteTO route : userRoutes) {
@@ -55,7 +54,7 @@ public class CamelRouteITCase extends AbstractITCase {
     public void groupRoutes() {
         Assume.assumeTrue(CamelDetector.isCamelEnabledForGroups(syncopeService));
 
-        List<CamelRouteTO> groupRoutes = camelRouteService.list(SubjectType.GROUP);
+        List<CamelRouteTO> groupRoutes = camelRouteService.list(AnyTypeKind.GROUP);
         assertNotNull(groupRoutes);
         assertEquals(7, groupRoutes.size());
         for (CamelRouteTO route : groupRoutes) {
@@ -146,7 +145,7 @@ public class CamelRouteITCase extends AbstractITCase {
             PlainSchemaTO schemaTO = new PlainSchemaTO();
             schemaTO.setKey("camelAttribute");
             schemaTO.setType(AttrSchemaType.String);
-            createSchema(AttributableType.USER, SchemaType.PLAIN, schemaTO);
+            createSchema(SchemaType.PLAIN, schemaTO);
 
             UserTO userTO = new UserTO();
             userTO.setRealm(SyncopeConstants.ROOT_REALM);

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConfigurationITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConfigurationITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConfigurationITCase.java
index 6ae349c..7c1ca19 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConfigurationITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConfigurationITCase.java
@@ -42,7 +42,6 @@ import org.apache.syncope.common.lib.to.ConfTO;
 import org.apache.syncope.common.lib.to.PlainSchemaTO;
 import org.apache.syncope.common.lib.to.GroupTO;
 import org.apache.syncope.common.lib.types.AttrSchemaType;
-import org.apache.syncope.common.lib.types.AttributableType;
 import org.apache.syncope.common.lib.types.ClientExceptionType;
 import org.apache.syncope.common.lib.types.EntityViolationType;
 import org.apache.syncope.common.lib.types.SchemaType;
@@ -58,7 +57,7 @@ public class ConfigurationITCase extends AbstractITCase {
         PlainSchemaTO testKey = new PlainSchemaTO();
         testKey.setKey("testKey" + getUUIDString());
         testKey.setType(AttrSchemaType.String);
-        createSchema(AttributableType.CONFIGURATION, SchemaType.PLAIN, testKey);
+        createSchema(SchemaType.PLAIN, testKey);
 
         AttrTO conf = new AttrTO();
         conf.setSchema(testKey.getKey());
@@ -144,7 +143,7 @@ public class ConfigurationITCase extends AbstractITCase {
         failing.setType(AttrSchemaType.String);
 
         try {
-            createSchema(AttributableType.CONFIGURATION, SchemaType.PLAIN, failing);
+            createSchema(SchemaType.PLAIN, failing);
             fail();
         } catch (SyncopeClientException e) {
             assertEquals(ClientExceptionType.InvalidPlainSchema, e.getType());
@@ -191,19 +190,17 @@ public class ConfigurationITCase extends AbstractITCase {
         PlainSchemaTO membershipKey = new PlainSchemaTO();
         membershipKey.setKey("membershipKey" + getUUIDString());
         membershipKey.setType(AttrSchemaType.String);
-        createSchema(AttributableType.MEMBERSHIP, SchemaType.PLAIN, membershipKey);
+        createSchema(SchemaType.PLAIN, membershipKey);
 
         PlainSchemaTO groupKey = new PlainSchemaTO();
         groupKey.setKey("group"
                 + "Key" + getUUIDString());
         groupKey.setType(AttrSchemaType.String);
-        createSchema(AttributableType.GROUP, SchemaType.PLAIN, groupKey);
+        createSchema(SchemaType.PLAIN, groupKey);
 
         GroupTO groupTO = new GroupTO();
         groupTO.setRealm("/");
         groupTO.setName("aGroup" + getUUIDString());
-        groupTO.getMPlainAttrTemplates().add(membershipKey.getKey());
-        groupTO.getGPlainAttrTemplates().add(groupKey.getKey());
         groupTO = createGroup(groupTO);
 
         try {

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConnectorITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConnectorITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConnectorITCase.java
index 79aa078..5fcc1e9 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConnectorITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ConnectorITCase.java
@@ -46,7 +46,9 @@ import org.apache.syncope.common.lib.to.ConnPoolConfTO;
 import org.apache.syncope.common.lib.to.MappingItemTO;
 import org.apache.syncope.common.lib.to.MappingTO;
 import org.apache.syncope.common.lib.to.PlainSchemaTO;
+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.ConnConfPropSchema;
 import org.apache.syncope.common.lib.types.ConnConfProperty;
 import org.apache.syncope.common.lib.types.ConnectorCapability;
@@ -54,6 +56,7 @@ import org.apache.syncope.common.lib.types.IntMappingType;
 import org.apache.syncope.common.rest.api.service.ConnectorService;
 import org.apache.syncope.common.rest.api.service.ResourceService;
 import org.identityconnectors.common.security.GuardedString;
+import org.identityconnectors.framework.common.objects.ObjectClass;
 import org.junit.BeforeClass;
 import org.junit.FixMethodOrder;
 import org.junit.Test;
@@ -638,22 +641,27 @@ public class ConnectorITCase extends AbstractITCase {
             resourceTO.setKey(resourceName);
             resourceTO.setConnectorId(connectorTO.getKey());
 
-            conf = new HashSet<ConnConfProperty>();
+            conf = new HashSet<>();
             endpoint.getValues().clear();
             endpoint.getValues().add("http://localhost:9080/wssample/services/provisioning");
             conf.add(endpoint);
 
             resourceTO.getConnConfProperties().addAll(conf);
 
+            ProvisionTO provisionTO = new ProvisionTO();
+            provisionTO.setAnyType(AnyTypeKind.USER.name());
+            provisionTO.setObjectClass(ObjectClass.ACCOUNT_NAME);
+            resourceTO.getProvisions().add(provisionTO);
+
             MappingTO mapping = new MappingTO();
-            resourceTO.setUmapping(mapping);
+            provisionTO.setMapping(mapping);
 
             MappingItemTO mapItem = new MappingItemTO();
             mapItem.setExtAttrName("uid");
             mapItem.setIntAttrName("userId");
             mapItem.setIntMappingType(IntMappingType.UserPlainSchema);
             mapItem.setAccountid(true);
-            mapping.setAccountIdItem(mapItem);
+            mapping.setConnObjectKeyItem(mapItem);
             // ----------------------------------------
 
             // ----------------------------------------

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/DerSchemaITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/DerSchemaITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/DerSchemaITCase.java
index adbcdf7..d06ca77 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/DerSchemaITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/DerSchemaITCase.java
@@ -28,7 +28,6 @@ import java.util.List;
 import javax.ws.rs.core.Response;
 import org.apache.syncope.common.lib.SyncopeClientException;
 import org.apache.syncope.common.lib.to.DerSchemaTO;
-import org.apache.syncope.common.lib.types.AttributableType;
 import org.apache.syncope.common.lib.types.ClientExceptionType;
 import org.apache.syncope.common.lib.types.EntityViolationType;
 import org.apache.syncope.common.lib.types.SchemaType;
@@ -41,7 +40,7 @@ public class DerSchemaITCase extends AbstractITCase {
 
     @Test
     public void list() {
-        List<DerSchemaTO> derivedSchemas = schemaService.list(AttributableType.USER, SchemaType.DERIVED);
+        List<DerSchemaTO> derivedSchemas = schemaService.list(SchemaType.DERIVED);
         assertFalse(derivedSchemas.isEmpty());
         for (DerSchemaTO derivedSchemaTO : derivedSchemas) {
             assertNotNull(derivedSchemaTO);
@@ -50,8 +49,7 @@ public class DerSchemaITCase extends AbstractITCase {
 
     @Test
     public void read() {
-        DerSchemaTO derivedSchemaTO = schemaService.read(AttributableType.USER, SchemaType.DERIVED,
-                "cn");
+        DerSchemaTO derivedSchemaTO = schemaService.read(SchemaType.DERIVED, "cn");
         assertNotNull(derivedSchemaTO);
     }
 
@@ -61,63 +59,62 @@ public class DerSchemaITCase extends AbstractITCase {
         schema.setKey("derived");
         schema.setExpression("derived_sx + '_' + derived_dx");
 
-        DerSchemaTO actual = createSchema(AttributableType.USER, SchemaType.DERIVED, schema);
+        DerSchemaTO actual = createSchema(SchemaType.DERIVED, schema);
         assertNotNull(actual);
 
-        actual = schemaService.read(AttributableType.USER, SchemaType.DERIVED, actual.getKey());
+        actual = schemaService.read(SchemaType.DERIVED, actual.getKey());
         assertNotNull(actual);
         assertEquals(actual.getExpression(), "derived_sx + '_' + derived_dx");
     }
 
     @Test
     public void delete() {
-        DerSchemaTO schema = schemaService.read(AttributableType.GROUP, SchemaType.DERIVED, "rderiveddata");
+        DerSchemaTO schema = schemaService.read(SchemaType.DERIVED, "rderiveddata");
         assertNotNull(schema);
 
-        schemaService.delete(AttributableType.GROUP, SchemaType.DERIVED, schema.getKey());
+        schemaService.delete(SchemaType.DERIVED, schema.getKey());
 
         try {
-            schemaService.read(AttributableType.GROUP, SchemaType.DERIVED, "rderiveddata");
+            schemaService.read(SchemaType.DERIVED, "rderiveddata");
             fail();
         } catch (SyncopeClientException e) {
             assertEquals(ClientExceptionType.NotFound, e.getType());
         } finally {
             // Recreate schema to make test re-runnable
-            schema = createSchema(AttributableType.GROUP, SchemaType.DERIVED, schema);
+            schema = createSchema(SchemaType.DERIVED, schema);
             assertNotNull(schema);
         }
     }
 
     @Test
     public void update() {
-        DerSchemaTO schema = schemaService.read(AttributableType.MEMBERSHIP, SchemaType.DERIVED,
-                "mderiveddata");
+        DerSchemaTO schema = schemaService.read(SchemaType.DERIVED, "mderiveddata");
         assertNotNull(schema);
         assertEquals("mderived_sx + '-' + mderived_dx", schema.getExpression());
         try {
             schema.setExpression("mderived_sx + '.' + mderived_dx");
 
-            schemaService.update(AttributableType.MEMBERSHIP, SchemaType.DERIVED,
+            schemaService.update(SchemaType.DERIVED,
                     schema.getKey(), schema);
 
-            schema = schemaService.read(AttributableType.MEMBERSHIP, SchemaType.DERIVED, "mderiveddata");
+            schema = schemaService.read(SchemaType.DERIVED, "mderiveddata");
             assertNotNull(schema);
             assertEquals("mderived_sx + '.' + mderived_dx", schema.getExpression());
         } finally {
             // Set updated back to make test re-runnable
             schema.setExpression("mderived_sx + '-' + mderived_dx");
-            schemaService.update(AttributableType.MEMBERSHIP, SchemaType.DERIVED,
+            schemaService.update(SchemaType.DERIVED,
                     schema.getKey(), schema);
         }
     }
 
     @Test
     public void issueSYNCOPE323() {
-        DerSchemaTO actual = schemaService.read(AttributableType.GROUP, SchemaType.DERIVED, "rderiveddata");
+        DerSchemaTO actual = schemaService.read(SchemaType.DERIVED, "rderiveddata");
         assertNotNull(actual);
 
         try {
-            createSchema(AttributableType.GROUP, SchemaType.DERIVED, actual);
+            createSchema(SchemaType.DERIVED, actual);
             fail();
         } catch (SyncopeClientException e) {
             assertEquals(Response.Status.CONFLICT, e.getType().getResponseStatus());
@@ -126,7 +123,7 @@ public class DerSchemaITCase extends AbstractITCase {
 
         actual.setKey(null);
         try {
-            createSchema(AttributableType.GROUP, SchemaType.DERIVED, actual);
+            createSchema(SchemaType.DERIVED, actual);
             fail();
         } catch (SyncopeClientException e) {
             assertEquals(Response.Status.BAD_REQUEST, e.getType().getResponseStatus());
@@ -141,7 +138,7 @@ public class DerSchemaITCase extends AbstractITCase {
         schema.setExpression("derived_sx + '_' + derived_dx");
 
         try {
-            createSchema(AttributableType.GROUP, SchemaType.DERIVED, schema);
+            createSchema(SchemaType.DERIVED, schema);
             fail();
         } catch (SyncopeClientException e) {
             assertEquals(ClientExceptionType.InvalidDerSchema, e.getType());

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ExceptionMapperITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ExceptionMapperITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ExceptionMapperITCase.java
index 6a42f5a..e13e400 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ExceptionMapperITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/ExceptionMapperITCase.java
@@ -31,7 +31,6 @@ import org.apache.syncope.common.lib.to.PlainSchemaTO;
 import org.apache.syncope.common.lib.to.RoleTO;
 import org.apache.syncope.common.lib.to.UserTO;
 import org.apache.syncope.common.lib.types.AttrSchemaType;
-import org.apache.syncope.common.lib.types.AttributableType;
 import org.apache.syncope.common.lib.types.SchemaType;
 import org.junit.BeforeClass;
 import org.junit.FixMethodOrder;
@@ -64,7 +63,7 @@ public class ExceptionMapperITCase extends AbstractITCase {
         schemaTO.setKey("unique" + schemaUID);
         schemaTO.setType(AttrSchemaType.String);
         schemaTO.setUniqueConstraint(true);
-        createSchema(AttributableType.USER, SchemaType.PLAIN, schemaTO);
+        createSchema(SchemaType.PLAIN, schemaTO);
 
         // 2. create an user with mandatory attributes and unique
         UserTO userTO1 = new UserTO();

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java
index 9be9a28..281fb1a 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/GroupITCase.java
@@ -51,15 +51,15 @@ import org.apache.syncope.common.lib.to.PagedResult;
 import org.apache.syncope.common.lib.to.PlainSchemaTO;
 import org.apache.syncope.common.lib.to.ResourceTO;
 import org.apache.syncope.common.lib.to.GroupTO;
+import org.apache.syncope.common.lib.to.MappingTO;
 import org.apache.syncope.common.lib.to.UserTO;
-import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.common.lib.types.ClientExceptionType;
 import org.apache.syncope.common.lib.types.IntMappingType;
 import org.apache.syncope.common.lib.types.MappingPurpose;
 import org.apache.syncope.common.lib.types.ResourceAssociationActionType;
 import org.apache.syncope.common.lib.types.ResourceDeassociationActionType;
 import org.apache.syncope.common.lib.types.SchemaType;
-import org.apache.syncope.common.lib.types.SubjectType;
 import org.apache.syncope.common.lib.wrap.ResourceName;
 import org.apache.syncope.common.rest.api.CollectionWrapper;
 import org.apache.syncope.common.rest.api.Preference;
@@ -83,7 +83,6 @@ public class GroupITCase extends AbstractITCase {
     public static GroupTO getSampleTO(final String name) {
         GroupTO groupTO = getBasicSampleTO(name);
 
-        groupTO.getGPlainAttrTemplates().add("icon");
         groupTO.getPlainAttrs().add(attrTO("icon", "anIcon"));
 
         groupTO.getResources().add(RESOURCE_NAME_LDAP);
@@ -94,7 +93,6 @@ public class GroupITCase extends AbstractITCase {
     @Ignore
     public void create() {
         GroupTO groupTO = getSampleTO("lastGroup");
-        groupTO.getGVirAttrTemplates().add("rvirtualdata");
         groupTO.getVirAttrs().add(attrTO("rvirtualdata", "rvirtualvalue"));
         groupTO.setGroupOwner(8L);
 
@@ -109,7 +107,7 @@ public class GroupITCase extends AbstractITCase {
         assertTrue(groupTO.getResources().contains(RESOURCE_NAME_LDAP));
 
         ConnObjectTO connObjectTO =
-                resourceService.getConnectorObject(RESOURCE_NAME_LDAP, SubjectType.GROUP, groupTO.getKey());
+                resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), groupTO.getKey());
         assertNotNull(connObjectTO);
         assertNotNull(connObjectTO.getPlainAttrMap().get("owner"));
 
@@ -199,7 +197,6 @@ public class GroupITCase extends AbstractITCase {
     @Test
     public void update() {
         GroupTO groupTO = getSampleTO("latestGroup" + getUUIDString());
-        groupTO.getGPlainAttrTemplates().add("show");
         groupTO = createGroup(groupTO);
 
         assertEquals(1, groupTO.getPlainAttrs().size());
@@ -219,7 +216,6 @@ public class GroupITCase extends AbstractITCase {
     @Test
     public void updateRemovingVirAttribute() {
         GroupTO groupTO = getBasicSampleTO("withvirtual" + getUUIDString());
-        groupTO.getGVirAttrTemplates().add("rvirtualdata");
         groupTO.getVirAttrs().add(attrTO("rvirtualdata", null));
 
         groupTO = createGroup(groupTO);
@@ -239,7 +235,6 @@ public class GroupITCase extends AbstractITCase {
     @Test
     public void updateRemovingDerAttribute() {
         GroupTO groupTO = getBasicSampleTO("withderived" + getUUIDString());
-        groupTO.getGDerAttrTemplates().add("rderivedschema");
         groupTO.getDerAttrs().add(attrTO("rderivedschema", null));
 
         groupTO = createGroup(groupTO);
@@ -325,7 +320,7 @@ public class GroupITCase extends AbstractITCase {
         GroupTO actual = createGroup(getSampleTO("unlink"));
         assertNotNull(actual);
 
-        assertNotNull(resourceService.getConnectorObject(RESOURCE_NAME_LDAP, SubjectType.GROUP, actual.getKey()));
+        assertNotNull(resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), actual.getKey()));
 
         assertNotNull(groupService.bulkDeassociation(actual.getKey(),
                 ResourceDeassociationActionType.UNLINK,
@@ -336,7 +331,7 @@ public class GroupITCase extends AbstractITCase {
         assertNotNull(actual);
         assertTrue(actual.getResources().isEmpty());
 
-        assertNotNull(resourceService.getConnectorObject(RESOURCE_NAME_LDAP, SubjectType.GROUP, actual.getKey()));
+        assertNotNull(resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), actual.getKey()));
     }
 
     @Test
@@ -348,7 +343,7 @@ public class GroupITCase extends AbstractITCase {
         assertNotNull(actual);
 
         try {
-            resourceService.getConnectorObject(RESOURCE_NAME_LDAP, SubjectType.GROUP, actual.getKey());
+            resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), actual.getKey());
             fail();
         } catch (Exception e) {
             assertNotNull(e);
@@ -363,7 +358,7 @@ public class GroupITCase extends AbstractITCase {
         assertFalse(actual.getResources().isEmpty());
 
         try {
-            resourceService.getConnectorObject(RESOURCE_NAME_LDAP, SubjectType.GROUP, actual.getKey());
+            resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), actual.getKey());
             fail();
         } catch (Exception e) {
             assertNotNull(e);
@@ -375,7 +370,7 @@ public class GroupITCase extends AbstractITCase {
         GroupTO actual = createGroup(getSampleTO("unassign"));
         assertNotNull(actual);
 
-        assertNotNull(resourceService.getConnectorObject(RESOURCE_NAME_LDAP, SubjectType.GROUP, actual.getKey()));
+        assertNotNull(resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), actual.getKey()));
 
         assertNotNull(groupService.bulkDeassociation(actual.getKey(),
                 ResourceDeassociationActionType.UNASSIGN,
@@ -387,7 +382,7 @@ public class GroupITCase extends AbstractITCase {
         assertTrue(actual.getResources().isEmpty());
 
         try {
-            resourceService.getConnectorObject(RESOURCE_NAME_LDAP, SubjectType.GROUP, actual.getKey());
+            resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), actual.getKey());
             fail();
         } catch (Exception e) {
             assertNotNull(e);
@@ -403,7 +398,7 @@ public class GroupITCase extends AbstractITCase {
         assertNotNull(actual);
 
         try {
-            resourceService.getConnectorObject(RESOURCE_NAME_LDAP, SubjectType.GROUP, actual.getKey());
+            resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), actual.getKey());
             fail();
         } catch (Exception e) {
             assertNotNull(e);
@@ -416,7 +411,7 @@ public class GroupITCase extends AbstractITCase {
 
         actual = groupService.read(actual.getKey());
         assertFalse(actual.getResources().isEmpty());
-        assertNotNull(resourceService.getConnectorObject(RESOURCE_NAME_LDAP, SubjectType.GROUP, actual.getKey()));
+        assertNotNull(resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), actual.getKey()));
     }
 
     @Test
@@ -424,7 +419,7 @@ public class GroupITCase extends AbstractITCase {
         GroupTO actual = createGroup(getSampleTO("deprovision"));
         assertNotNull(actual);
 
-        assertNotNull(resourceService.getConnectorObject(RESOURCE_NAME_LDAP, SubjectType.GROUP, actual.getKey()));
+        assertNotNull(resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), actual.getKey()));
 
         assertNotNull(groupService.bulkDeassociation(actual.getKey(),
                 ResourceDeassociationActionType.DEPROVISION,
@@ -436,7 +431,7 @@ public class GroupITCase extends AbstractITCase {
         assertFalse(actual.getResources().isEmpty());
 
         try {
-            resourceService.getConnectorObject(RESOURCE_NAME_LDAP, SubjectType.GROUP, actual.getKey());
+            resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), actual.getKey());
             fail();
         } catch (Exception e) {
             assertNotNull(e);
@@ -452,7 +447,7 @@ public class GroupITCase extends AbstractITCase {
         assertNotNull(actual);
 
         try {
-            resourceService.getConnectorObject(RESOURCE_NAME_LDAP, SubjectType.GROUP, actual.getKey());
+            resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), actual.getKey());
             fail();
         } catch (Exception e) {
             assertNotNull(e);
@@ -466,7 +461,7 @@ public class GroupITCase extends AbstractITCase {
         actual = groupService.read(actual.getKey());
         assertTrue(actual.getResources().isEmpty());
 
-        assertNotNull(resourceService.getConnectorObject(RESOURCE_NAME_LDAP, SubjectType.GROUP, actual.getKey()));
+        assertNotNull(resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), actual.getKey()));
     }
 
     @Test
@@ -478,7 +473,7 @@ public class GroupITCase extends AbstractITCase {
         assertNotNull(actual);
 
         try {
-            resourceService.getConnectorObject(RESOURCE_NAME_LDAP, SubjectType.GROUP, actual.getKey());
+            resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), actual.getKey());
             fail();
         } catch (Exception e) {
             assertNotNull(e);
@@ -492,7 +487,7 @@ public class GroupITCase extends AbstractITCase {
         actual = groupService.read(actual.getKey());
         assertTrue(actual.getResources().isEmpty());
 
-        assertNotNull(resourceService.getConnectorObject(RESOURCE_NAME_LDAP, SubjectType.GROUP, actual.getKey()));
+        assertNotNull(resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), actual.getKey()));
 
         assertNotNull(groupService.bulkDeassociation(actual.getKey(),
                 ResourceDeassociationActionType.DEPROVISION,
@@ -504,7 +499,7 @@ public class GroupITCase extends AbstractITCase {
         assertTrue(actual.getResources().isEmpty());
 
         try {
-            resourceService.getConnectorObject(RESOURCE_NAME_LDAP, SubjectType.GROUP, actual.getKey());
+            resourceService.readConnObject(RESOURCE_NAME_LDAP, AnyTypeKind.GROUP.name(), actual.getKey());
             fail();
         } catch (Exception e) {
             assertNotNull(e);
@@ -517,7 +512,7 @@ public class GroupITCase extends AbstractITCase {
         PlainSchemaTO badge = new PlainSchemaTO();
         badge.setKey("badge" + getUUIDString());
         badge.setMandatoryCondition("true");
-        schemaService.create(AttributableType.GROUP, SchemaType.PLAIN, badge);
+        schemaService.create(SchemaType.PLAIN, badge);
 
         // 2. create a group *without* an attribute for that schema: it works
         GroupTO groupTO = getSampleTO("lastGroup");
@@ -530,8 +525,6 @@ public class GroupITCase extends AbstractITCase {
         // failure since no values are provided and it is mandatory
         GroupMod groupMod = new GroupMod();
         groupMod.setKey(groupTO.getKey());
-        groupMod.setModGAttrTemplates(true);
-        groupMod.getGPlainAttrTemplates().add(badge.getKey());
 
         try {
             updateGroup(groupMod);
@@ -598,32 +591,32 @@ public class GroupITCase extends AbstractITCase {
     public void issueSYNCOPE632() {
         GroupTO groupTO = null;
         try {
-            // 1. create new LDAP resource having account id mapped to a derived attribute
+            // 1. create new LDAP resource having ConnObjectKey mapped to a derived attribute
             ResourceTO newLDAP = resourceService.read(RESOURCE_NAME_LDAP);
             newLDAP.setKey("new-ldap");
             newLDAP.setPropagationPrimary(true);
-            MappingItemTO accountId = newLDAP.getGmapping().getAccountIdItem();
-            accountId.setIntMappingType(IntMappingType.GroupDerivedSchema);
-            accountId.setIntAttrName("displayProperty");
-            newLDAP.getGmapping().setAccountIdItem(accountId);
-            newLDAP.getGmapping().setAccountLink("'cn=' + displayProperty + ',ou=groups,o=isp'");
+
+            MappingTO mapping = newLDAP.getProvision(AnyTypeKind.GROUP.name()).getMapping();
+
+            MappingItemTO connObjectKey = mapping.getConnObjectKeyItem();
+            connObjectKey.setIntMappingType(IntMappingType.GroupDerivedSchema);
+            connObjectKey.setIntAttrName("displayProperty");
+            mapping.setConnObjectKeyItem(connObjectKey);
+            mapping.setConnObjectLink("'cn=' + displayProperty + ',ou=groups,o=isp'");
 
             MappingItemTO description = new MappingItemTO();
             description.setIntMappingType(IntMappingType.GroupId);
             description.setExtAttrName("description");
             description.setPurpose(MappingPurpose.BOTH);
-            newLDAP.getGmapping().addItem(description);
+            mapping.add(description);
 
             newLDAP = createResource(newLDAP);
             assertNotNull(newLDAP);
 
             // 2. create a group and give the resource created above
             groupTO = getSampleTO("lastGroup" + getUUIDString());
-            groupTO.getGPlainAttrTemplates().add("icon");
             groupTO.getPlainAttrs().add(attrTO("icon", "anIcon"));
-            groupTO.getGPlainAttrTemplates().add("show");
             groupTO.getPlainAttrs().add(attrTO("show", "true"));
-            groupTO.getGDerAttrTemplates().add("displayProperty");
             groupTO.getDerAttrs().add(attrTO("displayProperty", null));
             groupTO.getResources().clear();
             groupTO.getResources().add("new-ldap");
@@ -682,7 +675,7 @@ public class GroupITCase extends AbstractITCase {
         assertTrue(userService.read(4L).getDynGroups().isEmpty());
 
         GroupTO group = getBasicSampleTO("dynMembership");
-        group.setDynMembershipCond("cool==true");
+        group.setUDynMembershipCond("cool==true");
         group = createGroup(group);
         assertNotNull(group);
 
@@ -690,7 +683,7 @@ public class GroupITCase extends AbstractITCase {
 
         GroupMod mod = new GroupMod();
         mod.setKey(group.getKey());
-        mod.setDynMembershipCond("cool==false");
+        mod.setUDynMembershipCond("cool==false");
         groupService.update(mod.getKey(), mod);
 
         assertTrue(userService.read(4L).getDynGroups().isEmpty());

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/LoggerITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/LoggerITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/LoggerITCase.java
index 012c6ab..2ed8449 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/LoggerITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/LoggerITCase.java
@@ -27,7 +27,7 @@ import java.text.ParseException;
 import java.util.List;
 import org.apache.syncope.common.lib.to.EventCategoryTO;
 import org.apache.syncope.common.lib.to.LoggerTO;
-import org.apache.syncope.common.lib.types.AttributableType;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.common.lib.types.AuditElements;
 import org.apache.syncope.common.lib.types.AuditElements.EventCategoryType;
 import org.apache.syncope.common.lib.types.AuditLoggerName;
@@ -168,7 +168,7 @@ public class LoggerITCase extends AbstractITCase {
 
         found = false;
         for (EventCategoryTO eventCategoryTO : events) {
-            if (AttributableType.USER.name().toLowerCase().equals(eventCategoryTO.getCategory())) {
+            if (AnyTypeKind.USER.name().toLowerCase().equals(eventCategoryTO.getCategory())) {
                 if (RESOURCE_NAME_LDAP.equals(eventCategoryTO.getSubcategory())
                         && EventCategoryType.SYNCHRONIZATION == eventCategoryTO.getType()) {
                     assertTrue(eventCategoryTO.getEvents().contains(ResourceOperation.CREATE.name().toLowerCase()));
@@ -182,7 +182,7 @@ public class LoggerITCase extends AbstractITCase {
 
         found = false;
         for (EventCategoryTO eventCategoryTO : events) {
-            if (AttributableType.USER.name().toLowerCase().equals(eventCategoryTO.getCategory())) {
+            if (AnyTypeKind.USER.name().toLowerCase().equals(eventCategoryTO.getCategory())) {
                 if (RESOURCE_NAME_CSV.equals(eventCategoryTO.getSubcategory())
                         && EventCategoryType.PROPAGATION == eventCategoryTO.getType()) {
                     assertTrue(eventCategoryTO.getEvents().contains(ResourceOperation.CREATE.name().toLowerCase()));

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/NotificationITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/NotificationITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/NotificationITCase.java
index 18abb97..c58b7b7 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/NotificationITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/NotificationITCase.java
@@ -28,6 +28,7 @@ import javax.ws.rs.core.Response;
 import org.apache.syncope.client.lib.SyncopeClient;
 import org.apache.syncope.common.lib.SyncopeClientException;
 import org.apache.syncope.common.lib.to.NotificationTO;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.common.lib.types.ClientExceptionType;
 import org.apache.syncope.common.lib.types.IntMappingType;
 import org.apache.syncope.common.lib.types.TraceLevel;
@@ -44,7 +45,8 @@ public class NotificationITCase extends AbstractITCase {
         notificationTO.setTraceLevel(TraceLevel.SUMMARY);
         notificationTO.getEvents().add("create");
 
-        notificationTO.setUserAbout(SyncopeClient.getUserSearchConditionBuilder().
+        notificationTO.getAbouts().put(AnyTypeKind.USER.name(),
+                SyncopeClient.getUserSearchConditionBuilder().
                 is("fullname").equalTo("*o*").and("fullname").equalTo("*i*").query());
 
         notificationTO.setRecipientAttrName("email");
@@ -154,7 +156,7 @@ public class NotificationITCase extends AbstractITCase {
     public void issueSYNCOPE446() {
         NotificationTO notificationTO = buildNotificationTO();
         notificationTO.getStaticRecipients().add("syncope446@syncope.apache.org");
-        notificationTO.setGroupAbout(
+        notificationTO.getAbouts().put(AnyTypeKind.GROUP.name(),
                 SyncopeClient.getGroupSearchConditionBuilder().is("name").equalTo("citizen").query());
 
         NotificationTO actual = null;

http://git-wip-us.apache.org/repos/asf/syncope/blob/081d9a04/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/NotificationTaskITCase.java
----------------------------------------------------------------------
diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/NotificationTaskITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/NotificationTaskITCase.java
index b3ca9ab..3fd0778 100644
--- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/NotificationTaskITCase.java
+++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/NotificationTaskITCase.java
@@ -30,6 +30,7 @@ import org.apache.syncope.common.lib.to.NotificationTO;
 import org.apache.syncope.common.lib.to.NotificationTaskTO;
 import org.apache.syncope.common.lib.to.TaskExecTO;
 import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.common.lib.types.IntMappingType;
 import org.apache.syncope.common.lib.types.TraceLevel;
 import org.apache.syncope.common.rest.api.service.NotificationService;
@@ -109,7 +110,8 @@ public class NotificationTaskITCase extends AbstractTaskITCase {
         notification.setTraceLevel(TraceLevel.FAILURES);
         notification.getEvents().add("[REST]:[UserLogic]:[]:[create]:[SUCCESS]");
 
-        notification.setUserAbout(SyncopeClient.getUserSearchConditionBuilder().inGroups(7L).query());
+        notification.getAbouts().put(AnyTypeKind.USER.name(),
+                SyncopeClient.getUserSearchConditionBuilder().inGroups(7L).query());
 
         notification.setRecipients(SyncopeClient.getUserSearchConditionBuilder().inGroups(8L).query());
         notification.setSelfAsRecipient(true);
@@ -130,7 +132,7 @@ public class NotificationTaskITCase extends AbstractTaskITCase {
         // 2. create user
         UserTO userTO = UserITCase.getUniqueSampleTO("syncope@syncope.apache.org");
         MembershipTO membershipTO = new MembershipTO();
-        membershipTO.setGroupKey(7);
+        membershipTO.setRightKey(7);
         userTO.getMemberships().add(membershipTO);
 
         userTO = createUser(userTO);