syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [12/53] [abbrv] syncope git commit: Default Syncope provisioning manager correctly restored
Date Mon, 05 Jan 2015 13:34:17 GMT
Default Syncope provisioning manager correctly restored


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

Branch: refs/heads/master
Commit: efe6c5ea6ebfe99f46435e13a6799c36557eae65
Parents: de130b7
Author: giacomolm <giacomolm@hotmail.it>
Authored: Mon Dec 22 15:21:47 2014 +0100
Committer: giacomolm <giacomolm@hotmail.it>
Committed: Mon Dec 22 15:21:47 2014 +0100

----------------------------------------------------------------------
 .../DefaultRoleProvisioningManager.java         |  23 +-
 .../DefaultUserProvisioningManager.java         |  55 +-
 core/src/main/resources/camelRoute.xml          | 816 +++++++++----------
 core/src/main/resources/coreContext.xml         |   4 +-
 4 files changed, 459 insertions(+), 439 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/efe6c5ea/core/src/main/java/org/apache/syncope/core/provisioning/DefaultRoleProvisioningManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/provisioning/DefaultRoleProvisioningManager.java b/core/src/main/java/org/apache/syncope/core/provisioning/DefaultRoleProvisioningManager.java
index de9e1fc..f376641 100644
--- a/core/src/main/java/org/apache/syncope/core/provisioning/DefaultRoleProvisioningManager.java
+++ b/core/src/main/java/org/apache/syncope/core/provisioning/DefaultRoleProvisioningManager.java
@@ -70,13 +70,7 @@ public class DefaultRoleProvisioningManager implements RoleProvisioningManager{
     @Override
     public Map.Entry<Long, List<PropagationStatus>> create(RoleTO subject, Set<String> excludedResources) {
         
-        WorkflowResult<Long> created;
-        try{
-            created = rwfAdapter.create(subject);
-        }
-        catch(RuntimeException e){
-            throw e;
-        }
+        WorkflowResult<Long> created = rwfAdapter.create(subject);
 
         EntitlementUtil.extendAuthContext(created.getResult());
 
@@ -89,6 +83,9 @@ public class DefaultRoleProvisioningManager implements RoleProvisioningManager{
             LOG.error("Error propagation primary resource", e);
             propagationReporter.onPrimaryResourceFailure(tasks);
         }
+
+        final RoleTO savedTO = binder.getRoleTO(created.getResult());
+        savedTO.getPropagationStatusTOs().addAll(propagationReporter.getStatuses());
         
         Map.Entry<Long, List<PropagationStatus>> result = new AbstractMap.SimpleEntry<Long, List<PropagationStatus>>(
                 created.getResult(), propagationReporter.getStatuses());
@@ -125,17 +122,10 @@ public class DefaultRoleProvisioningManager implements RoleProvisioningManager{
     @Override
     public Map.Entry<Long, List<PropagationStatus>> update(RoleMod subjectMod, Set<String> excludedResources) {
                 
-        WorkflowResult<Long> updated;
-        
-        try{
-            updated = rwfAdapter.update(subjectMod);
-        }
-        catch(RuntimeException e){
-            throw e;
-        }
+        WorkflowResult<Long> updated = rwfAdapter.update(subjectMod);
 
         List<PropagationTask> tasks = propagationManager.getRoleUpdateTaskIds(updated,
-                subjectMod.getVirAttrsToRemove(), subjectMod.getVirAttrsToUpdate(),excludedResources);
+                subjectMod.getVirAttrsToRemove(), subjectMod.getVirAttrsToUpdate());
         PropagationReporter propagationReporter = ApplicationContextProvider.getApplicationContext().getBean(
                 PropagationReporter.class);
         try {
@@ -144,6 +134,7 @@ public class DefaultRoleProvisioningManager implements RoleProvisioningManager{
             LOG.error("Error propagation primary resource", e);
             propagationReporter.onPrimaryResourceFailure(tasks);
         }
+
         
         Map.Entry<Long, List<PropagationStatus>> result = new AbstractMap.SimpleEntry<Long, List<PropagationStatus>>(
                 updated.getResult(), propagationReporter.getStatuses());

http://git-wip-us.apache.org/repos/asf/syncope/blob/efe6c5ea/core/src/main/java/org/apache/syncope/core/provisioning/DefaultUserProvisioningManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/syncope/core/provisioning/DefaultUserProvisioningManager.java b/core/src/main/java/org/apache/syncope/core/provisioning/DefaultUserProvisioningManager.java
index 54f677c..070c6aa 100644
--- a/core/src/main/java/org/apache/syncope/core/provisioning/DefaultUserProvisioningManager.java
+++ b/core/src/main/java/org/apache/syncope/core/provisioning/DefaultUserProvisioningManager.java
@@ -25,6 +25,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import org.apache.syncope.common.mod.MembershipMod;
 import org.apache.syncope.common.mod.StatusMod;
 import org.apache.syncope.common.mod.UserMod;
 import org.apache.syncope.common.to.PropagationStatus;
@@ -67,11 +68,11 @@ public class DefaultUserProvisioningManager implements UserProvisioningManager{
 
     @Override
     public Map.Entry<Long, List<PropagationStatus>> create(final UserTO userTO){
-        return create(userTO, true);
+        return create(userTO, true, false, null, Collections.<String>emptySet());
     }
     
     public Map.Entry<Long, List<PropagationStatus>> create(final UserTO userTO, boolean storePassword) {
-        WorkflowResult<Map.Entry<Long, Boolean>> created;
+        /*WorkflowResult<Map.Entry<Long, Boolean>> created;
         try {
             created = uwfAdapter.create(userTO,storePassword);
         } catch (RuntimeException e) {
@@ -92,20 +93,21 @@ public class DefaultUserProvisioningManager implements UserProvisioningManager{
 
         Map.Entry<Long, List<PropagationStatus>> result = new AbstractMap.SimpleEntry<Long, List<PropagationStatus>>(
                 created.getResult().getKey(), propagationReporter.getStatuses());
-        return result;
+        return result;*/
+        return create(userTO, storePassword, false, null, Collections.<String>emptySet());
     }
     
     @Override
     public Map.Entry<Long, List<PropagationStatus>> create(UserTO userTO, boolean storePassword, boolean disablePwdPolicyCheck, Boolean enabled, Set<String> excludedResources) {
                 WorkflowResult<Map.Entry<Long, Boolean>> created;
         try {
-            created = uwfAdapter.create(userTO,storePassword);
+            created = uwfAdapter.create(userTO, disablePwdPolicyCheck, enabled, storePassword);
         } catch (RuntimeException e) {
             throw e;
         }
 
         List<PropagationTask> tasks = propagationManager.getUserCreateTaskIds(
-                created, userTO.getPassword(), userTO.getVirAttrs(), excludedResources, null);
+                created, userTO.getPassword(), userTO.getVirAttrs(), excludedResources, userTO.getMemberships());
         PropagationReporter propagationReporter = ApplicationContextProvider.getApplicationContext().
                 getBean(PropagationReporter.class);
         try {
@@ -135,14 +137,39 @@ public class DefaultUserProvisioningManager implements UserProvisioningManager{
         }
 
         List<PropagationTask> tasks = propagationManager.getUserUpdateTaskIds(updated);
-
+        if (tasks.isEmpty()) {
+            // SYNCOPE-459: take care of user virtual attributes ...
+            final PropagationByResource propByResVirAttr = binder.fillVirtual(
+                    updated.getResult().getKey().getId(),
+                    userMod.getVirAttrsToRemove(),
+                    userMod.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 : userMod.getMembershipsToAdd()) {
+                if (!binder.fillMembershipVirtual(
+                        updated.getResult().getKey().getId(),
+                        membershipMod.getRole(),
+                        null,
+                        membershipMod.getVirAttrsToRemove(),
+                        membershipMod.getVirAttrsToUpdate(),
+                        false).isEmpty()) {
+                    addOrUpdateMemberships = true;
+                }
+            }
+            tasks.addAll(!propByResVirAttr.isEmpty() || addOrUpdateMemberships || removeMemberships
+                    ? propagationManager.getUserUpdateTaskIds(updated, false, null)
+                    : Collections.<PropagationTask>emptyList());
+        }
         PropagationReporter propagationReporter = ApplicationContextProvider.getApplicationContext().
                 getBean(PropagationReporter.class);
-        try {
-            taskExecutor.execute(tasks, propagationReporter);
-        } catch (PropagationException e) {
-            LOG.error("Error propagation primary resource", e);
-            propagationReporter.onPrimaryResourceFailure(tasks);
+        if (!tasks.isEmpty()) {
+            try {
+                taskExecutor.execute(tasks, propagationReporter);
+            } catch (PropagationException e) {
+                LOG.error("Error propagation primary resource", e);
+                propagationReporter.onPrimaryResourceFailure(tasks);
+            }
         }
 
         Map.Entry<Long, List<PropagationStatus>> result = new AbstractMap.SimpleEntry<Long, List<PropagationStatus>>(
@@ -272,7 +299,8 @@ public class DefaultUserProvisioningManager implements UserProvisioningManager{
     }
 
     @Override
-    public Map.Entry<Long, List<PropagationStatus>> updateInSync(final UserMod userMod,final Long id, final SyncResult result, Boolean enabled, Set<String> excludedResources){
+    public Map.Entry<Long, List<PropagationStatus>> updateInSync(final UserMod userMod,final Long id, 
+                                               final SyncResult result, Boolean enabled, Set<String> excludedResources){
         
         WorkflowResult<Map.Entry<UserMod, Boolean>> updated;
         try {
@@ -313,13 +341,14 @@ public class DefaultUserProvisioningManager implements UserProvisioningManager{
                     getBean(PropagationReporter.class);
 
             List<PropagationTask> tasks = propagationManager.getUserUpdateTaskIds(updated,updated.getResult().getKey().getPassword() != null,excludedResources);
-                
+               
             try {
                     taskExecutor.execute(tasks, propagationReporter);
             } catch (PropagationException e) {
                     LOG.error("Error propagation primary resource", e);
                     propagationReporter.onPrimaryResourceFailure(tasks);
             }
+
             
             return new AbstractMap.SimpleEntry<Long, List<PropagationStatus>>(updated.getResult().getKey().getId(), propagationReporter.getStatuses());
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/efe6c5ea/core/src/main/resources/camelRoute.xml
----------------------------------------------------------------------
diff --git a/core/src/main/resources/camelRoute.xml b/core/src/main/resources/camelRoute.xml
index e1ad071..260f01c 100644
--- a/core/src/main/resources/camelRoute.xml
+++ b/core/src/main/resources/camelRoute.xml
@@ -24,445 +24,445 @@ under the License.
                            http://camel.apache.org/schema/spring
                            http://camel.apache.org/schema/spring/camel-spring.xsd">
  
+  <!--
+      The default routes define each task involved in user creation:
+      main operations consist in user workflow creation and its propagation.         
+  -->
+  <routeContext id="defaultRoutes" xmlns="http://camel.apache.org/schema/spring">    
+        
     <!--
-        The default routes define each task involved in user creation:
-        main operations consist in user workflow creation and its propagation.         
+        CREATE USER
+        This is the entry point of the route and is involved in accepting
+        the UserTO. When it arrives, the user workflow is created. If the
+        creation is successfull, the result is sent to propagation, otherwise
+        if an exception was raised, the exception has to be returned to the
+        caller. The property actual allows to store the received UserTO in
+        order to use it later.
     -->
-    <routeContext id="defaultRoutes" xmlns="http://camel.apache.org/schema/spring">    
-        
-        <!--
-            CREATE USER
-            This is the entry point of the route and is involved in accepting
-            the UserTO. When it arrives, the user workflow is created. If the
-            creation is successfull, the result is sent to propagation, otherwise
-            if an exception was raised, the exception has to be returned to the
-            caller. The property actual allows to store the received UserTO in
-            order to use it later.
-        -->
         
-        <route id="createUser">
-          <from uri="direct:createUser"/>
-          <setProperty propertyName="actual">
-            <simple>${body}</simple>
-          </setProperty>
-          <doTry>
-            <bean ref="uwfAdapter" method="create(${body},${property.disablePwdPolicyCheck},
+    <route id="createUser">
+      <from uri="direct:createUser"/>
+      <setProperty propertyName="actual">
+        <simple>${body}</simple>
+      </setProperty>
+      <doTry>
+        <bean ref="uwfAdapter" method="create(${body},${property.disablePwdPolicyCheck},
                                  ${property.enabled},${property.storePassword})"/>
-            <process ref="defaultUserCreatePropagation" />
-            <to uri="direct:createPort"/>
-            <doCatch>        
-                <exception>java.lang.RuntimeException</exception>
-                <handled>
-                    <constant>false</constant>
-                </handled>
-                <to uri="direct:createPort"/>
-            </doCatch>
-          </doTry>
-        </route> 
+        <process ref="defaultUserCreatePropagation" />
+        <to uri="direct:createPort"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:createPort"/>
+        </doCatch>
+      </doTry>
+    </route> 
         
-        <!--
-            The propagation route deals with propagation of created user. In this
-            case we used a custom processor to perform this task: it means that
-            a custom java class contains the propagation strategy.
-        -->
+    <!--
+        The propagation route deals with propagation of created user. In this
+        case we used a custom processor to perform this task: it means that
+        a custom java class contains the propagation strategy.
+    -->
        
-        <!--
-            UPDATE USER
-        -->
-        <route id="updateUser">
-            <from uri="direct:updateUser"/>
-            <setProperty propertyName="actual">
-                <simple>${body}</simple>
-            </setProperty>
-            <doTry>
-              <bean ref="uwfAdapter" method="update(${body})"/>
-              <process ref="defaultUserUpdatePropagation" />
-              <to uri="direct:updatePort"/>
-              <doCatch>        
-                  <exception>java.lang.RuntimeException</exception>
-                  <handled>
-                      <constant>false</constant>
-                  </handled>
-                  <to uri="direct:updatePort"/>
-              </doCatch>
-            </doTry>
-        </route>
+    <!--
+        UPDATE USER
+    -->
+    <route id="updateUser">
+      <from uri="direct:updateUser"/>
+      <setProperty propertyName="actual">
+        <simple>${body}</simple>
+      </setProperty>
+      <doTry>
+        <bean ref="uwfAdapter" method="update(${body})"/>
+        <process ref="defaultUserUpdatePropagation" />
+        <to uri="direct:updatePort"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:updatePort"/>
+        </doCatch>
+      </doTry>
+    </route>
         
 
                 
-        <!--
-            UPDATE SYNC USER
-        -->
-        <route id="updateSyncUser">
-            <from uri="direct:updateSyncUser"/>            
-            <doTry>
-              <bean ref="uwfAdapter" method="update(${body})"/>
-              <to uri="direct:syncUserStatus"/>
-              <doCatch>        
-                  <exception>java.lang.RuntimeException</exception>
-                  <handled>
-                      <constant>false</constant>
-                  </handled>
-                  <to uri="direct:updateSyncPort"/>
-              </doCatch>
-            </doTry>
-        </route>
+    <!--
+        UPDATE SYNC USER
+    -->
+    <route id="updateSyncUser">
+      <from uri="direct:updateSyncUser"/>            
+      <doTry>
+        <bean ref="uwfAdapter" method="update(${body})"/>
+        <to uri="direct:syncUserStatus"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:updateSyncPort"/>
+        </doCatch>
+      </doTry>
+    </route>
         
-        <route id="syncUserStatus">
-            <from uri="direct:syncUserStatus"/>
-                <process ref="userStatusOnSync" />
-                <process ref="defaultUserUpdateSyncPropagation" />
-            <to uri="direct:updateSyncPort"/>
-        </route>
-        <!--
-            DELETE USER
-        -->
-        <route id="deleteUser">
-            <from uri="direct:deleteUser"/>
-            <doTry>
-              <process ref="defaultUserDeletePropagation" />
-              <bean ref="uwfAdapter" method="delete(${body})"/>
-              <setBody>
-                  <simple>${property.statuses}</simple>
-              </setBody>
-              <to uri="direct:deletePort"/>
-              <doCatch>        
-                  <exception>java.lang.RuntimeException</exception>
-                  <handled>
-                      <constant>false</constant>
-                  </handled>
-                  <to uri="direct:deletePort"/>
-              </doCatch>
-            </doTry>
-        </route>
+    <route id="syncUserStatus">
+      <from uri="direct:syncUserStatus"/>
+      <process ref="userStatusOnSync" />
+      <process ref="defaultUserUpdateSyncPropagation" />
+      <to uri="direct:updateSyncPort"/>
+    </route>
+    <!--
+        DELETE USER
+    -->
+    <route id="deleteUser">
+      <from uri="direct:deleteUser"/>
+      <doTry>
+        <process ref="defaultUserDeletePropagation" />
+        <bean ref="uwfAdapter" method="delete(${body})"/>
+        <setBody>
+          <simple>${property.statuses}</simple>
+        </setBody>
+        <to uri="direct:deletePort"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:deletePort"/>
+        </doCatch>
+      </doTry>
+    </route>
         
-        <!-- 
-            UNLINK USER
-        -->
-        <route id="unlinkUser">
-            <from uri="direct:unlinkUser"/>
-            <doTry>
-                <bean ref="uwfAdapter" method="update(${body})"/>
-                <setBody>
-                   <simple>${body.getResult.getKey}</simple>
-                </setBody>
-                <to uri="direct:unlinkPort"/>
-                <doCatch>        
-                    <exception>java.lang.RuntimeException</exception>
-                    <handled>
-                        <constant>false</constant>
-                    </handled>
-                    <to uri="direct:unlinkPort"/>
-                </doCatch>
-            </doTry>            
-        </route>
+    <!-- 
+        UNLINK USER
+    -->
+    <route id="unlinkUser">
+      <from uri="direct:unlinkUser"/>
+      <doTry>
+        <bean ref="uwfAdapter" method="update(${body})"/>
+        <setBody>
+          <simple>${body.getResult.getKey}</simple>
+        </setBody>
+        <to uri="direct:unlinkPort"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:unlinkPort"/>
+        </doCatch>
+      </doTry>            
+    </route>
         
-        <!--
-            LINK USER
-        -->
+    <!--
+        LINK USER
+    -->
         
-        <route id="linkUser">
-            <from uri="direct:linkUser"/>
-            <doTry>
-                <bean ref="uwfAdapter" method="update(${body})"/>
-                <setBody>
-                   <simple>${body.getResult.getKey}</simple>
-                </setBody>
-                <to uri="direct:linkPort"/>
-                <doCatch>        
-                    <exception>java.lang.RuntimeException</exception>
-                    <handled>
-                        <constant>false</constant>
-                    </handled>
-                    <to uri="direct:linkPort"/>
-                </doCatch>
-            </doTry>            
-        </route>
+    <route id="linkUser">
+      <from uri="direct:linkUser"/>
+      <doTry>
+        <bean ref="uwfAdapter" method="update(${body})"/>
+        <setBody>
+          <simple>${body.getResult.getKey}</simple>
+        </setBody>
+        <to uri="direct:linkPort"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:linkPort"/>
+        </doCatch>
+      </doTry>            
+    </route>
         
-        <!-- 
-            ACTIVATE USER
-        -->
-        <route id="activateUser">
-            <from uri="direct:activateUser"/>
-            <doTry>
-                <bean ref="uwfAdapter" method="activate(${body}, ${property.token})"/>
-                <to uri="direct:statusUser"/>
-                <doCatch>        
-                   <exception>java.lang.RuntimeException</exception>
-                   <handled>
-                       <constant>false</constant>
-                   </handled>
-                   <to uri="direct:statusPort"/>
-                </doCatch>
-            </doTry>    
-        </route>
-        <!-- 
-            REACTIVATE USER
-        -->
-        <route id="reactivateUser">
-            <from uri="direct:reactivateUser"/>
-            <doTry>
-                <bean ref="uwfAdapter" method="reactivate(${body})"/>
-                <to uri="direct:statusUser"/>
-                <doCatch>        
-                   <exception>java.lang.RuntimeException</exception>
-                   <handled>
-                       <constant>false</constant>
-                   </handled>
-                   <to uri="direct:statusPort"/>
-                </doCatch>
-            </doTry>    
-        </route>
-        <!-- 
-            SUSPEND USER
-        -->
-        <route id="suspendUser">
-            <from uri="direct:suspendUser"/>
-            <doTry>
-                <bean ref="uwfAdapter" method="suspend(${body})"/>
-                <to uri="direct:statusUser"/>
-                <doCatch>        
-                   <exception>java.lang.RuntimeException</exception>
-                   <handled>
-                       <constant>false</constant>
-                   </handled>
-                   <to uri="direct:statusPort"/>
-                </doCatch>
-            </doTry>  
-        </route>
+    <!-- 
+        ACTIVATE USER
+    -->
+    <route id="activateUser">
+      <from uri="direct:activateUser"/>
+      <doTry>
+        <bean ref="uwfAdapter" method="activate(${body}, ${property.token})"/>
+        <to uri="direct:statusUser"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:statusPort"/>
+        </doCatch>
+      </doTry>    
+    </route>
+    <!-- 
+        REACTIVATE USER
+    -->
+    <route id="reactivateUser">
+      <from uri="direct:reactivateUser"/>
+      <doTry>
+        <bean ref="uwfAdapter" method="reactivate(${body})"/>
+        <to uri="direct:statusUser"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:statusPort"/>
+        </doCatch>
+      </doTry>    
+    </route>
+    <!-- 
+        SUSPEND USER
+    -->
+    <route id="suspendUser">
+      <from uri="direct:suspendUser"/>
+      <doTry>
+        <bean ref="uwfAdapter" method="suspend(${body})"/>
+        <to uri="direct:statusUser"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:statusPort"/>
+        </doCatch>
+      </doTry>  
+    </route>
         
-        <!-- 
-            STATUS PROPAGATION
-        -->
+    <!-- 
+        STATUS PROPAGATION
+    -->
         
-        <route id="statusUser">
-            <from uri="direct:statusUser"/>            
-              <process ref="defaultUserStatusPropagation" />
-            <to uri="direct:statusPort"/>              
-        </route>
+    <route id="statusUser">
+      <from uri="direct:statusUser"/>            
+      <process ref="defaultUserStatusPropagation" />
+      <to uri="direct:statusPort"/>              
+    </route>
         
         
-        <!--
-            DEPROVISION USER
-        -->
-        <route id="deprovisionUser">
-            <from uri="direct:deprovisionUser"/>            
-              <process ref="defaultUserDeprovisionPropagation" />
-              <to uri="direct:deprovisionPort"/>              
-        </route>
+    <!--
+        DEPROVISION USER
+    -->
+    <route id="deprovisionUser">
+      <from uri="direct:deprovisionUser"/>            
+      <process ref="defaultUserDeprovisionPropagation" />
+      <to uri="direct:deprovisionPort"/>              
+    </route>
         
-        <!--
-            CREATE ROLE
-        -->
+    <!--
+        CREATE ROLE
+    -->
         
-        <route id="createRole">
-          <from uri="direct:createRole"/>
-          <setProperty propertyName="subject">
-            <simple>${body}</simple>
-          </setProperty>
-          <doTry>
-            <bean ref="rwfAdapter" method="create(${body})"/>
-            <process ref="defaultRoleCreatePropagation" />
-            <to uri="direct:createRolePort"/>
-            <doCatch>        
-                <exception>java.lang.RuntimeException</exception>
-                <handled>
-                    <constant>false</constant>
-                </handled>
-                <to uri="direct:createRolePort"/>
-            </doCatch>
-          </doTry>
-        </route> 
+    <route id="createRole">
+      <from uri="direct:createRole"/>
+      <setProperty propertyName="subject">
+        <simple>${body}</simple>
+      </setProperty>
+      <doTry>
+        <bean ref="rwfAdapter" method="create(${body})"/>
+        <process ref="defaultRoleCreatePropagation" />
+        <to uri="direct:createRolePort"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:createRolePort"/>
+        </doCatch>
+      </doTry>
+    </route> 
                
-        <!--
-            CREATE ROLE SYNC
-        -->
-        <route id="createRoleSync">
-          <from uri="direct:createRoleSync"/>
-          <setProperty propertyName="subject">
-            <simple>${body}</simple>
-          </setProperty>
-          <doTry>
-            <bean ref="rwfAdapter" method="create(${body})"/>
-            <process ref="defaultRoleCreateSyncPropagation" />
-            <to uri="direct:createRoleSyncPort"/>
-            <doCatch>        
-                <exception>java.lang.RuntimeException</exception>
-                <handled>
-                    <constant>false</constant>
-                </handled>
-                <to uri="direct:createRoleSyncPort"/>
-            </doCatch>
-          </doTry>
-        </route> 
+    <!--
+        CREATE ROLE SYNC
+    -->
+    <route id="createRoleSync">
+      <from uri="direct:createRoleSync"/>
+      <setProperty propertyName="subject">
+        <simple>${body}</simple>
+      </setProperty>
+      <doTry>
+        <bean ref="rwfAdapter" method="create(${body})"/>
+        <process ref="defaultRoleCreateSyncPropagation" />
+        <to uri="direct:createRoleSyncPort"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:createRoleSyncPort"/>
+        </doCatch>
+      </doTry>
+    </route> 
         
          
-        <!--
-            UPDATE ROLE
-        -->
-        <route id="updateRole">
-            <from uri="direct:updateRole"/>
-            <setProperty propertyName="subjectMod">
-                <simple>${body}</simple>
-            </setProperty>
-            <doTry>
-              <bean ref="rwfAdapter" method="update(${body})"/>
-              <process ref="defaultRoleUpdatePropagation" />
-              <to uri="direct:updateRolePort"/>
-              <doCatch>        
-                  <exception>java.lang.RuntimeException</exception>
-                  <handled>
-                      <constant>false</constant>
-                  </handled>
-                  <to uri="direct:updateRolePort"/>
-              </doCatch>
-            </doTry>
-        </route>
+    <!--
+        UPDATE ROLE
+    -->
+    <route id="updateRole">
+      <from uri="direct:updateRole"/>
+      <setProperty propertyName="subjectMod">
+        <simple>${body}</simple>
+      </setProperty>
+      <doTry>
+        <bean ref="rwfAdapter" method="update(${body})"/>
+        <process ref="defaultRoleUpdatePropagation" />
+        <to uri="direct:updateRolePort"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:updateRolePort"/>
+        </doCatch>
+      </doTry>
+    </route>
                
-        <!--
-            DELETE ROLE
-        -->
-        <route id="deleteRole">
-            <from uri="direct:deleteRole"/>
-            <doTry>
-              <process ref="defaultRoleDeletePropagation" />
-              <bean ref="rwfAdapter" method="delete(${body})"/>
-              <setBody>
-                  <simple>${property.statuses}</simple>
-              </setBody>
-              <to uri="direct:deleteRolePort"/>
-              <doCatch>        
-                  <exception>java.lang.RuntimeException</exception>
-                  <handled>
-                      <constant>false</constant>
-                  </handled>
-                  <to uri="direct:deleteRolePort"/>
-              </doCatch>
-            </doTry>
-        </route>
+    <!--
+        DELETE ROLE
+    -->
+    <route id="deleteRole">
+      <from uri="direct:deleteRole"/>
+      <doTry>
+        <process ref="defaultRoleDeletePropagation" />
+        <bean ref="rwfAdapter" method="delete(${body})"/>
+        <setBody>
+          <simple>${property.statuses}</simple>
+        </setBody>
+        <to uri="direct:deleteRolePort"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:deleteRolePort"/>
+        </doCatch>
+      </doTry>
+    </route>
         
-        <!-- 
-            UNLINK USER
-        -->
-        <route id="unlinkRole">
-            <from uri="direct:unlinkRole"/>
-            <doTry>
-                <bean ref="rwfAdapter" method="update(${body})"/>
-                <setBody>
-                   <simple>${body.getResult}</simple>
-                </setBody>
-                <to uri="direct:unlinkRolePort"/>
-                <doCatch>        
-                    <exception>java.lang.RuntimeException</exception>
-                    <handled>
-                        <constant>false</constant>
-                    </handled>
-                    <to uri="direct:unlinkRolePort"/>
-                </doCatch>
-            </doTry>            
-        </route>
+    <!-- 
+        UNLINK USER
+    -->
+    <route id="unlinkRole">
+      <from uri="direct:unlinkRole"/>
+      <doTry>
+        <bean ref="rwfAdapter" method="update(${body})"/>
+        <setBody>
+          <simple>${body.getResult}</simple>
+        </setBody>
+        <to uri="direct:unlinkRolePort"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:unlinkRolePort"/>
+        </doCatch>
+      </doTry>            
+    </route>
         
-        <!--
-            LINK USER
-        -->
+    <!--
+        LINK USER
+    -->
         
-        <route id="linkRole">
-            <from uri="direct:linkRole"/>
-            <doTry>
-                <bean ref="rwfAdapter" method="update(${body})"/>
-                <setBody>
-                   <simple>${body.getResult}</simple>
-                </setBody>
-                <to uri="direct:linkRolePort"/>
-                <doCatch>        
-                    <exception>java.lang.RuntimeException</exception>
-                    <handled>
-                        <constant>false</constant>
-                    </handled>
-                    <to uri="direct:linkRolePort"/>
-                </doCatch>
-            </doTry>            
-        </route>
+    <route id="linkRole">
+      <from uri="direct:linkRole"/>
+      <doTry>
+        <bean ref="rwfAdapter" method="update(${body})"/>
+        <setBody>
+          <simple>${body.getResult}</simple>
+        </setBody>
+        <to uri="direct:linkRolePort"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:linkRolePort"/>
+        </doCatch>
+      </doTry>            
+    </route>
         
-        <!--
-            DEPROVISION ROLE
-        -->
-        <route id="deprovisionRole">
-            <from uri="direct:deprovisionRole"/>            
-              <process ref="defaultRoleDeprovisionPropagation" />
-              <to uri="direct:deprovisionRolePort"/>              
-        </route>
+    <!--
+        DEPROVISION ROLE
+    -->
+    <route id="deprovisionRole">
+      <from uri="direct:deprovisionRole"/>            
+      <process ref="defaultRoleDeprovisionPropagation" />
+      <to uri="direct:deprovisionRolePort"/>              
+    </route>
         
-        <!--
-            SUSPEND USER AFTER POLICY VIOLATION
-        -->
+    <!--
+        SUSPEND USER AFTER POLICY VIOLATION
+    -->
         
-        <route id="suspendUserWF">
-            <from uri="direct:suspendUserWF"/>
-            <doTry>
-                <bean ref="uwfAdapter" method="suspend(${body})"/>
-                <process ref="defaultUserWFSuspendPropagation"/>
-                <to uri="direct:suspendWFPort"/>
-                <doCatch>        
-                   <exception>java.lang.RuntimeException</exception>
-                   <handled>
-                       <constant>false</constant>
-                   </handled>
-                   <to uri="direct:suspendWFPort"/>
-                </doCatch>
-            </doTry>  
-        </route>
+    <route id="suspendUserWF">
+      <from uri="direct:suspendUserWF"/>
+      <doTry>
+        <bean ref="uwfAdapter" method="suspend(${body})"/>
+        <process ref="defaultUserWFSuspendPropagation"/>
+        <to uri="direct:suspendWFPort"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:suspendWFPort"/>
+        </doCatch>
+      </doTry>  
+    </route>
         
-        <!--
-            REQUEST PASSWORD RESET ROUTE
-        -->
+    <!--
+        REQUEST PASSWORD RESET ROUTE
+    -->
         
-        <route id="requestPwdReset">
-            <from uri="direct:requestPwdReset"/>
-            <doTry>
-                <bean ref="uwfAdapter" method="requestPasswordReset(${body})"/>
-                <to uri="direct:requestPwdResetPort"/>
-                <doCatch>        
-                   <exception>java.lang.RuntimeException</exception>
-                   <handled>
-                       <constant>false</constant>
-                   </handled>
-                   <to uri="direct:requestPwdResetPort"/>
-                </doCatch>
-            </doTry>  
-        </route>
-        <!--
-            CONFIRM PASSWORD RESET
-        -->
-        <route id="confirmPwdReset">
-            <from uri="direct:confirmPwdReset"/>
-            <doTry>
-              <bean ref="uwfAdapter" method="confirmPasswordReset(${property.userId},${property.token},${property.password})"/>
-              <process ref="defaultUserConfirmPwdResetPropagation" />
-              <to uri="direct:confirmPwdResetPort"/>
-              <doCatch>        
-                  <exception>java.lang.RuntimeException</exception>
-                  <handled>
-                      <constant>false</constant>
-                  </handled>
-                  <to uri="direct:confirmPwdResetPort"/>
-              </doCatch>
-            </doTry>
-        </route>
+    <route id="requestPwdReset">
+      <from uri="direct:requestPwdReset"/>
+      <doTry>
+        <bean ref="uwfAdapter" method="requestPasswordReset(${body})"/>
+        <to uri="direct:requestPwdResetPort"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:requestPwdResetPort"/>
+        </doCatch>
+      </doTry>  
+    </route>
+    <!--
+        CONFIRM PASSWORD RESET
+    -->
+    <route id="confirmPwdReset">
+      <from uri="direct:confirmPwdReset"/>
+      <doTry>
+        <bean ref="uwfAdapter" method="confirmPasswordReset(${property.userId},${property.token},${property.password})"/>
+        <process ref="defaultUserConfirmPwdResetPropagation" />
+        <to uri="direct:confirmPwdResetPort"/>
+        <doCatch>        
+          <exception>java.lang.RuntimeException</exception>
+          <handled>
+            <constant>false</constant>
+          </handled>
+          <to uri="direct:confirmPwdResetPort"/>
+        </doCatch>
+      </doTry>
+    </route>
         
-    </routeContext>
-    <bean id="defaultUserCreatePropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultUserCreatePropagation"/>
-    <bean id="defaultUserUpdatePropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultUserUpdatePropagation"/>    
-    <bean id="userStatusOnSync" class="org.apache.syncope.core.provisioning.camel.processors.UserStatusOnSync"/>
-    <bean id="defaultUserUpdateSyncPropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultUserUpdateInSyncPropagation"/>
-    <bean id="defaultUserDeletePropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultUserDeletePropagation"/>    
-    <bean id="defaultUserDeprovisionPropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultUserDeprovisionPropagation"/>    
-    <bean id="defaultUserWFSuspendPropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultUserWFSuspendPropagation"/>
-    <bean id="defaultUserStatusPropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultUserStatusPropagation"/>
-    <bean id="defaultUserConfirmPwdResetPropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultUserConfirmPwdResetPropagation"/>
-    <bean id="defaultRoleCreatePropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultRoleCreatePropagation"/>
-    <bean id="defaultRoleCreateSyncPropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultRoleCreateSyncPropagation"/>
-    <bean id="defaultRoleUpdatePropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultRoleUpdatePropagation"/>
-    <bean id="defaultRoleDeletePropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultRoleDeletePropagation"/>    
-    <bean id="defaultRoleDeprovisionPropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultRoleDeprovisionPropagation"/>            
+  </routeContext>
+  <bean id="defaultUserCreatePropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultUserCreatePropagation"/>
+  <bean id="defaultUserUpdatePropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultUserUpdatePropagation"/>    
+  <bean id="userStatusOnSync" class="org.apache.syncope.core.provisioning.camel.processors.UserStatusOnSync"/>
+  <bean id="defaultUserUpdateSyncPropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultUserUpdateInSyncPropagation"/>
+  <bean id="defaultUserDeletePropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultUserDeletePropagation"/>    
+  <bean id="defaultUserDeprovisionPropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultUserDeprovisionPropagation"/>    
+  <bean id="defaultUserWFSuspendPropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultUserWFSuspendPropagation"/>
+  <bean id="defaultUserStatusPropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultUserStatusPropagation"/>
+  <bean id="defaultUserConfirmPwdResetPropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultUserConfirmPwdResetPropagation"/>
+  <bean id="defaultRoleCreatePropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultRoleCreatePropagation"/>
+  <bean id="defaultRoleCreateSyncPropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultRoleCreateSyncPropagation"/>
+  <bean id="defaultRoleUpdatePropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultRoleUpdatePropagation"/>
+  <bean id="defaultRoleDeletePropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultRoleDeletePropagation"/>    
+  <bean id="defaultRoleDeprovisionPropagation" class="org.apache.syncope.core.provisioning.camel.processors.DefaultRoleDeprovisionPropagation"/>            
 </beans>

http://git-wip-us.apache.org/repos/asf/syncope/blob/efe6c5ea/core/src/main/resources/coreContext.xml
----------------------------------------------------------------------
diff --git a/core/src/main/resources/coreContext.xml b/core/src/main/resources/coreContext.xml
index 3950689..e39ceed 100644
--- a/core/src/main/resources/coreContext.xml
+++ b/core/src/main/resources/coreContext.xml
@@ -76,8 +76,8 @@ under the License.
     <context:exclude-filter type="regex" expression=".*\.activiti\..*"/>
   </context:component-scan>
   
-  <bean id="defaultUserProvisioningManager" class="org.apache.syncope.core.provisioning.camel.CamelUserProvisioningManager"/>
-  <bean id="defaultRoleProvisioningManager" class="org.apache.syncope.core.provisioning.camel.CamelRoleProvisioningManager"/>
+  <bean id="defaultUserProvisioningManager" class="org.apache.syncope.core.provisioning.DefaultUserProvisioningManager"/>
+  <bean id="defaultRoleProvisioningManager" class="org.apache.syncope.core.provisioning.DefaultRoleProvisioningManager"/>
 
   <bean id="nonJPAdbInitializer" class="org.springframework.jdbc.datasource.init.DataSourceInitializer">
     <property name="dataSource" ref="dataSource"/>


Mime
View raw message