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/02/12 10:14:29 UTC

[24/54] [abbrv] [partial] syncope git commit: [SYNCOPE-620] Renaming 'server' after 'core', to provide continuity with older releases (especially for archetype)

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-jpa/src/test/resources/persistence.properties
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-jpa/src/test/resources/persistence.properties b/syncope620/core/persistence-jpa/src/test/resources/persistence.properties
new file mode 100644
index 0000000..92b0cbc
--- /dev/null
+++ b/syncope620/core/persistence-jpa/src/test/resources/persistence.properties
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+content.directory=${conf.directory}
+jpa.driverClassName=org.h2.Driver
+jpa.url=jdbc:h2:mem:syncopedb;DB_CLOSE_DELAY=-1
+jpa.username=sa
+jpa.password=
+jpa.dialect=org.apache.openjpa.jdbc.sql.H2Dictionary
+jpa.pool.validationQuery=SELECT 1
+jpa.orm=META-INF/spring-orm.xml
+#note: other connection pool settings can also be configured here, see persistenceContext.xml
+quartz.jobstore=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+quartz.scheduler.idleWaitTime=5000
+quartz.sql=tables_h2.sql
+audit.sql=audit.sql
+database.schema=

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-jpa/src/test/resources/persistenceTest.xml
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-jpa/src/test/resources/persistenceTest.xml b/syncope620/core/persistence-jpa/src/test/resources/persistenceTest.xml
new file mode 100644
index 0000000..a87172b
--- /dev/null
+++ b/syncope620/core/persistence-jpa/src/test/resources/persistenceTest.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+                           http://www.springframework.org/schema/beans/spring-beans.xsd
+                           http://www.springframework.org/schema/context
+                           http://www.springframework.org/schema/context/spring-context.xsd">
+
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+    <property name="locations">
+      <list>
+        <value>classpath:persistence.properties</value>
+        <value>classpath:security.properties</value>
+      </list>
+    </property>
+    <property name="ignoreResourceNotFound" value="true"/>
+    <property name="ignoreUnresolvablePlaceholders" value="true"/>
+  </bean>
+  
+  <bean class="org.apache.syncope.core.misc.spring.ApplicationContextProvider"/>
+
+  <bean id="adminUser" class="java.lang.String">
+    <constructor-arg value="${adminUser}"/>
+  </bean>
+  <bean id="anonymousUser" class="java.lang.String">
+    <constructor-arg value="${anonymousUser}"/>
+  </bean>
+  
+  <context:component-scan base-package="org.apache.syncope.core.misc.policy"/>
+  <context:component-scan base-package="org.apache.syncope.core.misc.security"/>
+
+  <import resource="persistenceContext.xml"/>
+
+</beans>

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/persistence-jpa/src/test/resources/simplelogger.properties
----------------------------------------------------------------------
diff --git a/syncope620/core/persistence-jpa/src/test/resources/simplelogger.properties b/syncope620/core/persistence-jpa/src/test/resources/simplelogger.properties
new file mode 100644
index 0000000..1b21312
--- /dev/null
+++ b/syncope620/core/persistence-jpa/src/test/resources/simplelogger.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+org.slf4j.simpleLogger.defaultLogLevel=debug

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/core/pom.xml b/syncope620/core/pom.xml
new file mode 100644
index 0000000..243b27f
--- /dev/null
+++ b/syncope620/core/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.syncope</groupId>
+    <artifactId>syncope</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <name>Apache Syncope Core</name>
+  <description>Apache Syncope Core</description>
+  <groupId>org.apache.syncope</groupId>
+  <artifactId>syncope-core</artifactId>
+  <packaging>pom</packaging>
+
+  <modules>
+    <module>persistence-api</module>
+    <module>persistence-jpa</module>
+    <module>misc</module>
+    <module>provisioning-api</module>
+    <module>provisioning-java</module>
+    <module>workflow-api</module>
+    <module>workflow-java</module>
+    <module>workflow-activiti</module>
+    <module>logic</module>
+    <module>rest-cxf</module>
+  </modules>
+
+</project>

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/pom.xml
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/pom.xml b/syncope620/core/provisioning-api/pom.xml
new file mode 100644
index 0000000..a634406
--- /dev/null
+++ b/syncope620/core/provisioning-api/pom.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.syncope</groupId>
+    <artifactId>syncope-core</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <name>Apache Syncope Core Provisioning API</name>
+  <description>Apache Syncope Core Provisioning API</description>
+  <groupId>org.apache.syncope.core</groupId>
+  <artifactId>syncope-core-provisioning-api</artifactId>
+  <packaging>jar</packaging>
+  
+  <properties>
+    <rootpom.basedir>${basedir}/../..</rootpom.basedir>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.quartz-scheduler</groupId>
+      <artifactId>quartz</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.syncope.core</groupId>
+      <artifactId>syncope-core-persistence-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-pmd-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/AttributableTransformer.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/AttributableTransformer.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/AttributableTransformer.java
new file mode 100644
index 0000000..bcbe900
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/AttributableTransformer.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api;
+
+import org.apache.syncope.common.lib.mod.AbstractAttributableMod;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+
+/**
+ * Provides logic for transforming user or role, received as input by RESTful methods, before any internal
+ * processing logic takes place.
+ */
+public interface AttributableTransformer {
+
+    <T extends AbstractAttributableTO> T transform(T input);
+
+    <T extends AbstractAttributableMod> T transform(T input);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnIdBundleManager.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnIdBundleManager.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnIdBundleManager.java
new file mode 100644
index 0000000..1f0ef11
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnIdBundleManager.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api;
+
+import java.net.URI;
+import java.util.List;
+import java.util.Map;
+import org.identityconnectors.framework.api.ConfigurationProperties;
+import org.identityconnectors.framework.api.ConnectorInfo;
+import org.identityconnectors.framework.api.ConnectorInfoManager;
+
+/**
+ * Manage information about ConnId connector bundles.
+ */
+public interface ConnIdBundleManager {
+
+    ConfigurationProperties getConfigurationProperties(final ConnectorInfo info);
+
+    Map<URI, ConnectorInfoManager> getConnManagers();
+
+    ConnectorInfo getConnectorInfo(final String location, final String bundleName, final String bundleVersion,
+            final String connectorName);
+
+    Map<String, List<ConnectorInfo>> getConnectorInfos();
+
+    void resetConnManagers();
+
+    List<URI> getLocations();
+
+    void setStringLocations(final String stringLocations);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnPoolConfUtil.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnPoolConfUtil.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnPoolConfUtil.java
new file mode 100644
index 0000000..7d12553
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnPoolConfUtil.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api;
+
+import org.apache.syncope.common.lib.to.ConnPoolConfTO;
+import org.apache.syncope.core.persistence.api.entity.ConnPoolConf;
+import org.identityconnectors.common.pooling.ObjectPoolConfiguration;
+
+public final class ConnPoolConfUtil {
+
+    public static ConnPoolConf getConnPoolConf(final ConnPoolConfTO cpcto, final ConnPoolConf cpc) {
+        ObjectPoolConfiguration opc = new ObjectPoolConfiguration();
+
+        cpc.setMaxIdle(cpcto.getMaxIdle() == null ? opc.getMaxIdle() : cpcto.getMaxIdle());
+        cpc.setMaxObjects(cpcto.getMaxObjects() == null ? opc.getMaxObjects() : cpcto.getMaxObjects());
+        cpc.setMaxWait(cpcto.getMaxWait() == null ? opc.getMaxWait() : cpcto.getMaxWait());
+        cpc.setMinEvictableIdleTimeMillis(cpcto.getMinEvictableIdleTimeMillis() == null
+                ? opc.getMinEvictableIdleTimeMillis() : cpcto.getMinEvictableIdleTimeMillis());
+        cpc.setMinIdle(cpcto.getMinIdle() == null ? opc.getMinIdle() : cpcto.getMinIdle());
+
+        return cpc;
+    }
+
+    public static ObjectPoolConfiguration getObjectPoolConfiguration(final ConnPoolConf cpc) {
+        ObjectPoolConfiguration opc = new ObjectPoolConfiguration();
+        updateObjectPoolConfiguration(opc, cpc);
+        return opc;
+    }
+
+    public static void updateObjectPoolConfiguration(
+            final ObjectPoolConfiguration opc, final ConnPoolConf cpc) {
+
+        if (cpc.getMaxIdle() != null) {
+            opc.setMaxIdle(cpc.getMaxIdle());
+        }
+        if (cpc.getMaxObjects() != null) {
+            opc.setMaxObjects(cpc.getMaxObjects());
+        }
+        if (cpc.getMaxWait() != null) {
+            opc.setMaxWait(cpc.getMaxWait());
+        }
+        if (cpc.getMinEvictableIdleTimeMillis() != null) {
+            opc.setMinEvictableIdleTimeMillis(cpc.getMinEvictableIdleTimeMillis());
+        }
+        if (cpc.getMinIdle() != null) {
+            opc.setMinIdle(cpc.getMinIdle());
+        }
+    }
+
+    private ConnPoolConfUtil() {
+        // empty constructor for static utility class
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/Connector.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/Connector.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/Connector.java
new file mode 100644
index 0000000..2715637
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/Connector.java
@@ -0,0 +1,216 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Set;
+import org.apache.syncope.common.lib.types.PropagationMode;
+import org.apache.syncope.common.lib.types.ResourceOperation;
+import org.apache.syncope.core.persistence.api.entity.ConnInstance;
+import org.apache.syncope.core.persistence.api.entity.MappingItem;
+import org.identityconnectors.framework.common.objects.Attribute;
+import org.identityconnectors.framework.common.objects.ConnectorObject;
+import org.identityconnectors.framework.common.objects.ObjectClass;
+import org.identityconnectors.framework.common.objects.OperationOptions;
+import org.identityconnectors.framework.common.objects.SyncResultsHandler;
+import org.identityconnectors.framework.common.objects.SyncToken;
+import org.identityconnectors.framework.common.objects.Uid;
+import org.identityconnectors.framework.common.objects.filter.Filter;
+
+/**
+ * Entry point for making requests on underlying connector bundles.
+ */
+public interface Connector {
+
+    /**
+     * Authenticate user on a connector instance.
+     *
+     * @param username the name based credential for authentication
+     * @param password the password based credential for authentication
+     * @param options ConnId's OperationOptions
+     * @return Uid of the account that was used to authenticate
+     */
+    Uid authenticate(String username, String password, OperationOptions options);
+
+    /**
+     * Create user / role on a connector instance.
+     *
+     * @param propagationMode propagation mode
+     * @param objectClass ConnId's object class
+     * @param attrs attributes for creation
+     * @param options ConnId's OperationOptions
+     * @param propagationAttempted if creation is actually performed (based on connector instance's capabilities)
+     * @return Uid for created object
+     */
+    Uid create(PropagationMode propagationMode, ObjectClass objectClass,
+            Set<Attribute> attrs, OperationOptions options,
+            Set<String> propagationAttempted);
+
+    /**
+     * Update user / role on a connector instance.
+     *
+     * @param propagationMode propagation mode
+     * @param objectClass ConnId's object class
+     * @param uid user to be updated
+     * @param attrs attributes for update
+     * @param options ConnId's OperationOptions
+     * @param propagationAttempted if update is actually performed (based on connector instance's capabilities)
+     * @return Uid for updated object
+     */
+    Uid update(PropagationMode propagationMode, ObjectClass objectClass,
+            Uid uid, Set<Attribute> attrs, OperationOptions options,
+            Set<String> propagationAttempted);
+
+    /**
+     * Delete user / role on a connector instance.
+     *
+     * @param propagationMode propagation mode
+     * @param objectClass ConnId's object class
+     * @param uid user to be deleted
+     * @param options ConnId's OperationOptions
+     * @param propagationAttempted if deletion is actually performed (based on connector instance's capabilities)
+     */
+    void delete(PropagationMode propagationMode, ObjectClass objectClass,
+            Uid uid, OperationOptions options, Set<String> propagationAttempted);
+
+    /**
+     * Sync users / roles from a connector instance.
+     *
+     * @param objectClass ConnId's object class
+     * @param token to be passed to the underlying connector
+     * @param handler to be used to handle deltas
+     * @param options ConnId's OperationOptions
+     */
+    void sync(ObjectClass objectClass, SyncToken token, SyncResultsHandler handler, OperationOptions options);
+
+    /**
+     * Read latest sync token from a connector instance.
+     *
+     * @param objectClass ConnId's object class.
+     * @return latest sync token
+     */
+    SyncToken getLatestSyncToken(ObjectClass objectClass);
+
+    /**
+     * Get remote object.
+     *
+     * @param objectClass ConnId's object class
+     * @param uid ConnId's Uid
+     * @param options ConnId's OperationOptions
+     * @return ConnId's connector object for given uid
+     */
+    ConnectorObject getObject(ObjectClass objectClass, Uid uid, OperationOptions options);
+
+    /**
+     * Get remote object used by the propagation manager in order to choose for a create (object doesn't exist) or an
+     * update (object exists).
+     *
+     * @param propagationMode propagation mode
+     * @param operationType resource operation type
+     * @param objectClass ConnId's object class
+     * @param uid ConnId's Uid
+     * @param options ConnId's OperationOptions
+     * @return ConnId's connector object for given uid
+     */
+    ConnectorObject getObject(PropagationMode propagationMode, ResourceOperation operationType, ObjectClass objectClass,
+            Uid uid, OperationOptions options);
+
+    /**
+     * Search for remote objects.
+     *
+     * @param objectClass ConnId's object class
+     * @param filter search filter
+     * @param options ConnId's OperationOptions
+     * @return ConnId's connector objects matching the given filter
+     */
+    List<ConnectorObject> search(ObjectClass objectClass, Filter filter, OperationOptions options);
+
+    /**
+     * Get remote object used by the propagation manager in order to choose for a create (object doesn't exist) or an
+     * update (object exists).
+     *
+     * @param objectClass ConnId's object class.
+     * @param handler to be used to handle deltas.
+     * @param options ConnId's OperationOptions.
+     */
+    void getAllObjects(ObjectClass objectClass, SyncResultsHandler handler, OperationOptions options);
+
+    /**
+     * Read attribute for a given connector object.
+     *
+     * @param objectClass ConnId's object class
+     * @param uid ConnId's Uid
+     * @param options ConnId's OperationOptions
+     * @param attributeName attribute to read
+     * @return attribute (if present)
+     */
+    Attribute getObjectAttribute(ObjectClass objectClass, Uid uid, OperationOptions options, String attributeName);
+
+    /**
+     * Read attributes for a given connector object.
+     *
+     * @param objectClass ConnId's object class
+     * @param uid ConnId's Uid
+     * @param options ConnId's OperationOptions
+     * @return attributes (if present)
+     */
+    Set<Attribute> getObjectAttributes(ObjectClass objectClass, Uid uid, OperationOptions options);
+
+    /**
+     * Return resource schema names.
+     *
+     * @param includeSpecial return special attributes (like as __NAME__ or __PASSWORD__) if true
+     * @return schema names
+     */
+    Set<String> getSchemaNames(boolean includeSpecial);
+
+    /**
+     * Return ConnId's object classes supported by this connector.
+     *
+     * @return supported object classes
+     */
+    Set<ObjectClass> getSupportedObjectClasses();
+
+    /**
+     * Validate a connector instance.
+     */
+    void validate();
+
+    /**
+     * Check connection to resource.
+     */
+    void test();
+
+    /**
+     * Getter for active connector instance.
+     *
+     * @return active connector instance.
+     */
+    ConnInstance getActiveConnInstance();
+
+    /**
+     * Build options for requesting all mapped connector attributes.
+     *
+     * @param mapItems mapping items
+     * @return options for requesting all mapped connector attributes
+     * @see OperationOptions
+     */
+    OperationOptions getOperationOptions(Collection<? extends MappingItem> mapItems);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnectorFactory.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnectorFactory.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnectorFactory.java
new file mode 100644
index 0000000..e4c6392
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnectorFactory.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api;
+
+import java.util.Set;
+import org.apache.syncope.common.lib.types.ConnConfProperty;
+import org.apache.syncope.core.persistence.api.SyncopeLoader;
+import org.apache.syncope.core.persistence.api.entity.ConnInstance;
+import org.apache.syncope.core.persistence.api.entity.ExternalResource;
+
+/**
+ * Entry point for creating and destroying connectors for external resources.
+ *
+ * @see Connector
+ */
+public interface ConnectorFactory extends SyncopeLoader {
+
+    /**
+     * Create connector from given connector instance and configuration properties.
+     *
+     * @param connInstance connector instance
+     * @param configuration configuration properties
+     * @return connector
+     */
+    Connector createConnector(ConnInstance connInstance, Set<ConnConfProperty> configuration);
+
+    /**
+     * Get existing connector for the given resource.
+     *
+     * @param resource the resource.
+     * @return live connector bran for given resource
+     */
+    Connector getConnector(ExternalResource resource);
+
+    /**
+     * Load connectors for all existing resources.
+     *
+     * @see ExternalResource
+     */
+    @Override
+    void load();
+
+    /**
+     * Unload connectors for all existing resources.
+     *
+     * @see ExternalResource
+     */
+    void unload();
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnectorRegistry.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnectorRegistry.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnectorRegistry.java
new file mode 100644
index 0000000..ce5f837
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ConnectorRegistry.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api;
+
+import java.util.Set;
+import org.apache.syncope.common.lib.types.ConnConfProperty;
+import org.apache.syncope.core.persistence.api.entity.ConnInstance;
+import org.apache.syncope.core.persistence.api.entity.ExternalResource;
+
+/**
+ * Manage Spring beans lifecycle for connectors.
+ */
+public interface ConnectorRegistry {
+
+    /**
+     * Returns a connector instance with overridden property values, if found.
+     *
+     * @param connInstance base connector instance
+     * @param overridden overridden property values
+     * @return connector instance with overridden property values, if found
+     */
+    ConnInstance getOverriddenConnInstance(ConnInstance connInstance, Set<ConnConfProperty> overridden);
+
+    /**
+     * Create and register into Spring context a bean for the given resource.
+     *
+     * @param resource external resource
+     */
+    void registerConnector(ExternalResource resource);
+
+    /**
+     * Removes the Spring bean for the given id from the context.
+     *
+     * @param id Spring bean id
+     */
+    void unregisterConnector(String id);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ProvisioningManager.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ProvisioningManager.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ProvisioningManager.java
new file mode 100644
index 0000000..3762996
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/ProvisioningManager.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import org.apache.syncope.common.lib.mod.AbstractAttributableMod;
+import org.apache.syncope.common.lib.to.AbstractAttributableTO;
+import org.apache.syncope.common.lib.to.PropagationStatus;
+
+public interface ProvisioningManager<T extends AbstractAttributableTO, M extends AbstractAttributableMod> {
+
+    Map.Entry<Long, List<PropagationStatus>> create(T subject);
+
+    Map.Entry<Long, List<PropagationStatus>> update(M subjectMod);
+
+    List<PropagationStatus> delete(Long subjectId);
+
+    Long unlink(M subjectMod);
+
+    Long link(M subjectMod);
+
+    List<PropagationStatus> deprovision(Long user, Collection<String> resources);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/RoleProvisioningManager.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/RoleProvisioningManager.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/RoleProvisioningManager.java
new file mode 100644
index 0000000..595af54
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/RoleProvisioningManager.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.apache.syncope.common.lib.mod.RoleMod;
+import org.apache.syncope.common.lib.to.PropagationStatus;
+import org.apache.syncope.common.lib.to.RoleTO;
+
+public interface RoleProvisioningManager extends ProvisioningManager<RoleTO, RoleMod> {
+
+    Map.Entry<Long, List<PropagationStatus>> create(RoleTO roleTO, Set<String> excludedResources);
+
+    Map.Entry<Long, List<PropagationStatus>> create(
+            RoleTO roleTO, Map<Long, String> roleOwnerMap, Set<String> excludedResources);
+
+    Map.Entry<Long, List<PropagationStatus>> update(RoleMod subjectMod, Set<String> excludedResources);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/TimeoutException.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/TimeoutException.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/TimeoutException.java
new file mode 100644
index 0000000..3f67890
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/TimeoutException.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api;
+
+public class TimeoutException extends RuntimeException {
+
+    private static final long serialVersionUID = -6577300049818278323L;
+
+    /**
+     * Creates a new instance of
+     * <code>TimeoutException</code> without detail message.
+     */
+    public TimeoutException() {
+        super();
+    }
+
+    /**
+     * Constructs an instance of
+     * <code>TimeoutException</code> with the specified detail message.
+     *
+     * @param msg the detail message.
+     */
+    public TimeoutException(final String msg) {
+        super(msg);
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/URIUtil.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/URIUtil.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/URIUtil.java
new file mode 100644
index 0000000..f8d23df
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/URIUtil.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+public final class URIUtil {
+
+    private URIUtil() {
+        // empty constructor for static utility class
+    }
+
+    /**
+     * Build a valid URI out of the given location.
+     * Only "file", "connid" and "connids" schemes are allowed.
+     * For "file", invalid characters are handled via intermediate transformation into URL.
+     *
+     * @param location the candidate location for URI
+     * @return valid URI for the given location
+     * @throws MalformedURLException if the intermediate URL is not valid
+     * @throws URISyntaxException if the given location does not correspond to a valid URI
+     */
+    public static URI buildForConnId(final String location) throws MalformedURLException, URISyntaxException {
+        final String candidate = location.trim();
+
+        if (!candidate.startsWith("file:")
+                && !candidate.startsWith("connid:") && !candidate.startsWith("connids:")) {
+
+            throw new IllegalArgumentException(candidate + " is not a valid URI for file or connid(s) schemes");
+        }
+
+        URI uri;
+        if (candidate.startsWith("file:")) {
+            uri = new File(new URL(candidate).getFile()).getAbsoluteFile().toURI();
+        } else {
+            uri = new URI(candidate);
+        }
+
+        return uri;
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/UserProvisioningManager.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/UserProvisioningManager.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/UserProvisioningManager.java
new file mode 100644
index 0000000..f51e70a
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/UserProvisioningManager.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.apache.syncope.common.lib.mod.StatusMod;
+import org.apache.syncope.common.lib.mod.UserMod;
+import org.apache.syncope.common.lib.to.PropagationStatus;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.core.persistence.api.entity.user.User;
+import org.apache.syncope.core.provisioning.api.sync.ProvisioningResult;
+
+public interface UserProvisioningManager extends ProvisioningManager<UserTO, UserMod> {
+
+    Map.Entry<Long, List<PropagationStatus>> activate(User user, StatusMod statusMod);
+
+    Map.Entry<Long, List<PropagationStatus>> reactivate(User user, StatusMod statusMod);
+
+    Map.Entry<Long, List<PropagationStatus>> suspend(User user, StatusMod statusMod);
+
+    void innerSuspend(User user, boolean propagate);
+
+    Map.Entry<Long, List<PropagationStatus>> create(UserTO userTO, boolean storePassword);
+
+    Map.Entry<Long, List<PropagationStatus>> create(UserTO userTO, boolean storePassword,
+            boolean disablePwdPolicyCheck, Boolean enabled, Set<String> excludedResources);
+
+    Map.Entry<Long, List<PropagationStatus>> update(UserMod userMod, boolean removeMemberships);
+
+    Map.Entry<Long, List<PropagationStatus>> update(UserMod userMod, Long key,
+            ProvisioningResult result, Boolean enabled, Set<String> excludedResources);
+
+    List<PropagationStatus> delete(Long subjectKey, Set<String> excludedResources);
+
+    void requestPasswordReset(Long key);
+
+    void confirmPasswordReset(User user, String token, String password);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/UserSuspender.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/UserSuspender.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/UserSuspender.java
new file mode 100644
index 0000000..610513c
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/UserSuspender.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api;
+
+import org.apache.syncope.core.persistence.api.entity.user.User;
+
+public interface UserSuspender {
+
+    void suspend(User user, boolean propagateSuspension);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/WorkflowResult.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/WorkflowResult.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/WorkflowResult.java
new file mode 100644
index 0000000..a88e1e6
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/WorkflowResult.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api;
+
+import java.util.Collections;
+import java.util.Set;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.apache.syncope.common.lib.types.PropagationByResource;
+
+public class WorkflowResult<T> {
+
+    private T result;
+
+    private PropagationByResource propByRes;
+
+    private Set<String> performedTasks;
+
+    public WorkflowResult(final T result, final PropagationByResource propByRes, final String performedTask) {
+        this.result = result;
+        this.propByRes = propByRes;
+        this.performedTasks = Collections.singleton(performedTask);
+    }
+
+    public WorkflowResult(final T result, final PropagationByResource propByRes, final Set<String> performedTasks) {
+        this.result = result;
+        this.propByRes = propByRes;
+        this.performedTasks = performedTasks;
+    }
+
+    public T getResult() {
+        return result;
+    }
+
+    public void setResult(final T result) {
+        this.result = result;
+    }
+
+    public Set<String> getPerformedTasks() {
+        return performedTasks;
+    }
+
+    public void setPerformedTasks(final Set<String> performedTasks) {
+        this.performedTasks = performedTasks;
+    }
+
+    public PropagationByResource getPropByRes() {
+        return propByRes;
+    }
+
+    public void setPropByRes(final PropagationByResource propByRes) {
+        this.propByRes = propByRes;
+    }
+
+    @Override
+    public boolean equals(final Object obj) {
+        return EqualsBuilder.reflectionEquals(this, obj);
+    }
+
+    @Override
+    public int hashCode() {
+        return HashCodeBuilder.reflectionHashCode(this);
+    }
+
+    @Override
+    public String toString() {
+        return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCache.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCache.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCache.java
new file mode 100644
index 0000000..d9df1ef
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCache.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.cache;
+
+import org.apache.syncope.common.lib.types.AttributableType;
+
+/**
+ * Virtual Attribute Value cache.
+ */
+public interface VirAttrCache {
+
+    /**
+     * Force entry expiring.
+     *
+     * @param type user or role
+     * @param id user or role id
+     * @param schemaName virtual attribute schema name
+     */
+    void expire(AttributableType type, Long id, String schemaName);
+
+    /**
+     * Retrieve cached value. Return null in case of virtual attribute not cached.
+     *
+     * @param type user or role
+     * @param id user or role id
+     * @param schemaName virtual attribute schema name.
+     * @return cached values or null if virtual attribute is not cached.
+     */
+    VirAttrCacheValue get(AttributableType type, Long id, String schemaName);
+
+    /**
+     * Cache entry is valid if and only if value exist and it is not expired.
+     *
+     * @param value cache entry value.
+     * @return TRUE if the value is valid; FALSE otherwise.
+     */
+    boolean isValidEntry(VirAttrCacheValue value);
+
+    /**
+     * Cache virtual attribute values.
+     *
+     * @param type user or role
+     * @param id user or role id
+     * @param schemaName virtual attribute name
+     * @param value virtual attribute values
+     */
+    void put(AttributableType type, Long id, String schemaName, VirAttrCacheValue value);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCacheKey.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCacheKey.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCacheKey.java
new file mode 100644
index 0000000..a33a740
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCacheKey.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.cache;
+
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import org.apache.syncope.common.lib.types.AttributableType;
+
+/**
+ * Cache entry key.
+ */
+public class VirAttrCacheKey {
+
+    /**
+     * Subject type.
+     */
+    private final AttributableType type;
+
+    /**
+     * Subject key.
+     */
+    private final transient Long key;
+
+    /**
+     * Virtual attribute schema name.
+     */
+    private final transient String virSchema;
+
+    public VirAttrCacheKey(final AttributableType type, final Long key, final String virSchema) {
+        this.type = type;
+        this.key = key;
+        this.virSchema = virSchema;
+    }
+
+    public AttributableType getType() {
+        return type;
+    }
+
+    public Long getKey() {
+        return key;
+    }
+
+    public String getVirSchema() {
+        return virSchema;
+    }
+
+    @Override
+    public boolean equals(final Object obj) {
+        return EqualsBuilder.reflectionEquals(this, obj, true);
+    }
+
+    @Override
+    public int hashCode() {
+        return HashCodeBuilder.reflectionHashCode(this, true);
+    }
+
+    @Override
+    public String toString() {
+        return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE, true);
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCacheValue.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCacheValue.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCacheValue.java
new file mode 100644
index 0000000..9d1bd84
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/cache/VirAttrCacheValue.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.cache;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Cache entry value.
+ */
+public class VirAttrCacheValue {
+
+    /**
+     * Virtual attribute values.
+     */
+    private final Map<String, Set<String>> values;
+
+    /**
+     * Entry creation date.
+     */
+    private Date creationDate;
+
+    /**
+     * Entry access date.
+     */
+    private Date lastAccessDate;
+
+    public VirAttrCacheValue() {
+        this.creationDate = new Date();
+        this.lastAccessDate = new Date();
+        values = new HashMap<>();
+    }
+
+    public void setResourceValues(final String resourceName, final Set<String> values) {
+        this.values.put(resourceName, values);
+    }
+
+    public Date getCreationDate() {
+        return creationDate;
+    }
+
+    public void forceExpiring() {
+        creationDate = new Date(0);
+    }
+
+    public Set<String> getValues(final String resourceName) {
+        return values.get(resourceName);
+    }
+
+    public Set<String> getValues() {
+        final Set<String> res = new HashSet<>();
+
+        for (Set<String> value : values.values()) {
+            res.addAll(value);
+        }
+
+        return res;
+    }
+
+    public Date getLastAccessDate() {
+        return lastAccessDate;
+    }
+
+    void setLastAccessDate(final Date lastAccessDate) {
+        this.lastAccessDate = lastAccessDate;
+    }
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ConfigurationDataBinder.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ConfigurationDataBinder.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ConfigurationDataBinder.java
new file mode 100644
index 0000000..e3a27bc
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ConfigurationDataBinder.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.data;
+
+import org.apache.syncope.common.lib.to.AttrTO;
+import org.apache.syncope.common.lib.to.ConfTO;
+import org.apache.syncope.core.persistence.api.entity.conf.CPlainAttr;
+import org.apache.syncope.core.persistence.api.entity.conf.Conf;
+
+public interface ConfigurationDataBinder {
+
+    AttrTO getAttrTO(CPlainAttr attr);
+
+    ConfTO getConfTO(Conf conf);
+
+    CPlainAttr getAttribute(AttrTO attributeTO);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ConnInstanceDataBinder.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ConnInstanceDataBinder.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ConnInstanceDataBinder.java
new file mode 100644
index 0000000..d3496a2
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ConnInstanceDataBinder.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.data;
+
+import java.util.Set;
+import org.apache.syncope.common.lib.to.ConnInstanceTO;
+import org.apache.syncope.common.lib.types.ConnConfPropSchema;
+import org.apache.syncope.common.lib.types.ConnConfProperty;
+import org.apache.syncope.core.persistence.api.entity.ConnInstance;
+import org.identityconnectors.framework.api.ConfigurationProperty;
+
+public interface ConnInstanceDataBinder {
+
+    ConnConfPropSchema buildConnConfPropSchema(ConfigurationProperty property);
+
+    ConnInstance getConnInstance(ConnInstanceTO connInstanceTO);
+
+    ConnInstanceTO getConnInstanceTO(ConnInstance connInstance);
+
+    /**
+     * Merge connector configuration properties avoiding repetition but giving priority to primary set.
+     *
+     * @param primary primary set.
+     * @param secondary secondary set.
+     * @return merged set.
+     */
+    Set<ConnConfProperty> mergeConnConfProperties(Set<ConnConfProperty> primary,
+            Set<ConnConfProperty> secondary);
+
+    ConnInstance updateConnInstance(long connInstanceId, ConnInstanceTO connInstanceTO);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/NotificationDataBinder.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/NotificationDataBinder.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/NotificationDataBinder.java
new file mode 100644
index 0000000..72a8cfc
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/NotificationDataBinder.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.data;
+
+import org.apache.syncope.common.lib.to.NotificationTO;
+import org.apache.syncope.core.persistence.api.entity.Notification;
+
+public interface NotificationDataBinder {
+
+    NotificationTO getNotificationTO(Notification notification);
+
+    Notification create(NotificationTO notificationTO);
+
+    void update(Notification notification, NotificationTO notificationTO);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/PolicyDataBinder.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/PolicyDataBinder.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/PolicyDataBinder.java
new file mode 100644
index 0000000..f225b28
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/PolicyDataBinder.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.data;
+
+import org.apache.syncope.common.lib.to.AbstractPolicyTO;
+import org.apache.syncope.core.persistence.api.entity.Policy;
+
+public interface PolicyDataBinder {
+
+    <T extends Policy> T getPolicy(T policy, AbstractPolicyTO policyTO);
+
+    /**
+     * Get policy TO from policy bean.
+     *
+     * @param policy bean.
+     * @return policy TO.
+     */
+    <T extends AbstractPolicyTO> T getPolicyTO(Policy policy);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ReportDataBinder.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ReportDataBinder.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ReportDataBinder.java
new file mode 100644
index 0000000..4c93cef
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ReportDataBinder.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.data;
+
+import org.apache.syncope.common.lib.to.ReportExecTO;
+import org.apache.syncope.common.lib.to.ReportTO;
+import org.apache.syncope.core.persistence.api.entity.Report;
+import org.apache.syncope.core.persistence.api.entity.ReportExec;
+
+public interface ReportDataBinder {
+
+    void getReport(Report report, ReportTO reportTO);
+
+    ReportExecTO getReportExecTO(ReportExec execution);
+
+    ReportTO getReportTO(Report report);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ResourceDataBinder.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ResourceDataBinder.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ResourceDataBinder.java
new file mode 100644
index 0000000..6d42ac8
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/ResourceDataBinder.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.data;
+
+import java.util.Collection;
+import java.util.List;
+import org.apache.syncope.common.lib.to.ResourceTO;
+import org.apache.syncope.core.persistence.api.entity.ConnInstance;
+import org.apache.syncope.core.persistence.api.entity.ExternalResource;
+
+public interface ResourceDataBinder {
+
+    ExternalResource create(ResourceTO resourceTO);
+
+    ConnInstance getConnInstance(ResourceTO resourceTO);
+
+    ResourceTO getResourceTO(ExternalResource resource);
+
+    List<ResourceTO> getResourceTOs(Collection<? extends ExternalResource> resources);
+
+    ExternalResource update(ExternalResource resource, ResourceTO resourceTO);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/RoleDataBinder.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/RoleDataBinder.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/RoleDataBinder.java
new file mode 100644
index 0000000..b2da797
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/RoleDataBinder.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.data;
+
+import org.apache.syncope.common.lib.mod.RoleMod;
+import org.apache.syncope.common.lib.to.RoleTO;
+import org.apache.syncope.common.lib.types.PropagationByResource;
+import org.apache.syncope.core.persistence.api.entity.role.Role;
+
+public interface RoleDataBinder {
+
+    RoleTO getRoleTO(Long key);
+
+    RoleTO getRoleTO(Role role);
+
+    Role create(Role role, RoleTO roleTO);
+
+    PropagationByResource update(Role role, RoleMod roleMod);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/SchemaDataBinder.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/SchemaDataBinder.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/SchemaDataBinder.java
new file mode 100644
index 0000000..52fd20b
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/SchemaDataBinder.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.data;
+
+import org.apache.syncope.common.lib.to.DerSchemaTO;
+import org.apache.syncope.common.lib.to.PlainSchemaTO;
+import org.apache.syncope.common.lib.to.VirSchemaTO;
+import org.apache.syncope.core.persistence.api.entity.AttributableUtil;
+import org.apache.syncope.core.persistence.api.entity.DerSchema;
+import org.apache.syncope.core.persistence.api.entity.PlainSchema;
+import org.apache.syncope.core.persistence.api.entity.VirSchema;
+
+public interface SchemaDataBinder {
+
+    <T extends PlainSchema> void create(PlainSchemaTO schemaTO, T schema);
+
+    <T extends DerSchema> T create(DerSchemaTO derSchemaTO, T derSchema);
+
+    <T extends VirSchema> T create(VirSchemaTO virSchemaTO, T virSchema);
+
+    <T extends DerSchema> DerSchemaTO getDerSchemaTO(T derSchema);
+
+    <T extends PlainSchema> PlainSchemaTO getSchemaTO(T schema, AttributableUtil attributableUtil);
+
+    <T extends VirSchema> VirSchemaTO getVirSchemaTO(T virSchema);
+
+    <T extends PlainSchema> void update(PlainSchemaTO schemaTO, T schema, AttributableUtil attributableUtil);
+
+    <T extends DerSchema> T update(DerSchemaTO derSchemaTO, T derSchema);
+
+    <T extends VirSchema> T update(VirSchemaTO virSchemaTO, T virSchema);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/SecurityQuestionDataBinder.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/SecurityQuestionDataBinder.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/SecurityQuestionDataBinder.java
new file mode 100644
index 0000000..3abf9b7
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/SecurityQuestionDataBinder.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.data;
+
+import org.apache.syncope.common.lib.to.SecurityQuestionTO;
+import org.apache.syncope.core.persistence.api.entity.user.SecurityQuestion;
+
+public interface SecurityQuestionDataBinder {
+
+    SecurityQuestion create(SecurityQuestionTO securityQuestionTO);
+
+    SecurityQuestionTO getSecurityQuestionTO(SecurityQuestion securityQuestion);
+
+    void update(SecurityQuestion securityQuestion, SecurityQuestionTO securityQuestionTO);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/TaskDataBinder.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/TaskDataBinder.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/TaskDataBinder.java
new file mode 100644
index 0000000..d09e054
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/TaskDataBinder.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.data;
+
+import org.apache.syncope.common.lib.to.AbstractTaskTO;
+import org.apache.syncope.common.lib.to.SchedTaskTO;
+import org.apache.syncope.common.lib.to.TaskExecTO;
+import org.apache.syncope.core.persistence.api.entity.task.SchedTask;
+import org.apache.syncope.core.persistence.api.entity.task.Task;
+import org.apache.syncope.core.persistence.api.entity.task.TaskExec;
+import org.apache.syncope.core.persistence.api.entity.task.TaskUtil;
+
+public interface TaskDataBinder {
+
+    SchedTask createSchedTask(SchedTaskTO taskTO, TaskUtil taskUtil);
+
+    TaskExecTO getTaskExecTO(TaskExec execution);
+
+    <T extends AbstractTaskTO> T getTaskTO(Task task, TaskUtil taskUtil);
+
+    void updateSchedTask(SchedTask task, SchedTaskTO taskTO, TaskUtil taskUtil);
+
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/UserDataBinder.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/UserDataBinder.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/UserDataBinder.java
new file mode 100644
index 0000000..e5fbb00
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/data/UserDataBinder.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.data;
+
+import org.apache.syncope.common.lib.mod.UserMod;
+import org.apache.syncope.common.lib.to.UserTO;
+import org.apache.syncope.common.lib.types.PropagationByResource;
+import org.apache.syncope.core.persistence.api.entity.user.User;
+
+public interface UserDataBinder {
+
+    UserTO getAuthenticatedUserTO();
+
+    UserTO getUserTO(String username);
+
+    UserTO getUserTO(Long key);
+
+    UserTO getUserTO(User user);
+
+    void create(User user, UserTO userTO, boolean storePassword);
+
+    PropagationByResource update(User toBeUpdated, UserMod userMod);
+
+    boolean verifyPassword(String username, String password);
+
+    boolean verifyPassword(User user, String password);
+}

http://git-wip-us.apache.org/repos/asf/syncope/blob/d30c8526/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/job/JobInstanceLoader.java
----------------------------------------------------------------------
diff --git a/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/job/JobInstanceLoader.java b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/job/JobInstanceLoader.java
new file mode 100644
index 0000000..7434976
--- /dev/null
+++ b/syncope620/core/provisioning-api/src/main/java/org/apache/syncope/core/provisioning/api/job/JobInstanceLoader.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.syncope.core.provisioning.api.job;
+
+import java.text.ParseException;
+import org.apache.syncope.core.persistence.api.entity.Report;
+import org.apache.syncope.core.persistence.api.entity.task.Task;
+import org.quartz.SchedulerException;
+
+public interface JobInstanceLoader {
+
+    void registerJob(Task task, String jobClassName, String cronExpression)
+            throws ClassNotFoundException, SchedulerException, ParseException;
+
+    void registerJob(Report report) throws SchedulerException, ParseException;
+
+    void registerReportJob(Long reportKey) throws SchedulerException, ParseException;
+
+    void registerTaskJob(Long taskKey) throws ClassNotFoundException, SchedulerException, ParseException;
+
+    void unregisterJob(Task task);
+
+    void unregisterJob(Report report);
+
+}