syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject svn commit: r1401182 [1/2] - in /incubator/syncope/trunk: client/src/main/java/org/apache/syncope/client/to/ client/src/main/java/org/apache/syncope/types/ console/src/main/java/org/apache/syncope/console/pages/ console/src/main/java/org/apache/syncope...
Date Tue, 23 Oct 2012 07:49:25 GMT
Author: ilgrosso
Date: Tue Oct 23 07:49:23 2012
New Revision: 1401182

URL: http://svn.apache.org/viewvc?rev=1401182&view=rev
Log:
[SYNCOPE-186] SyncopeSyncResultHanlder extracted from SyncJob + renaming

Added:
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationJob.java
      - copied, changed from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/NotificationJob.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/AbstractTaskJob.java
      - copied, changed from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/AbstractTaskJob.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/SampleJob.java
      - copied, changed from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SampleJob.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/SpringBeanJobFactory.java
      - copied, changed from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SpringBeanJobFactory.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/package-info.java
      - copied, changed from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/package-info.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/ReportJob.java
      - copied, changed from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/ReportJob.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/ReportXMLConst.java
      - copied, changed from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/ReportXMLConst.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/DefaultSyncActions.java
      - copied, changed from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/DefaultSyncJobActions.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/SyncActions.java
      - copied, changed from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SyncJobActions.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/SyncJob.java
      - copied, changed from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SyncJob.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/SyncResult.java
      - copied, changed from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SyncResult.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/SyncopeSyncResultHanlder.java   (with props)
    incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/quartz/
    incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/quartz/TestSyncActions.java
      - copied, changed from r1400893, incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/scheduling/TestSyncJobActions.java
Removed:
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/
    incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/scheduling/
Modified:
    incubator/syncope/trunk/client/src/main/java/org/apache/syncope/client/to/SyncTaskTO.java
    incubator/syncope/trunk/client/src/main/java/org/apache/syncope/types/AuditElements.java
    incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/SyncTaskModalPage.java
    incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/TaskRestClient.java
    incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SyncTaskModalPage.html
    incubator/syncope/trunk/core/pom.xml
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/ImplementationClassNamesLoader.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/JobInstanceLoader.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/SyncTask.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ReportExecDAOImpl.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ResourceDAOImpl.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/TaskExecDAOImpl.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/SchedTaskValidator.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/SyncTaskValidator.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/AbstractReportlet.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/UserReportlet.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/TaskController.java
    incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/TaskDataBinder.java
    incubator/syncope/trunk/core/src/main/resources/logback.xml
    incubator/syncope/trunk/core/src/main/resources/schedulingContext.xml
    incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/notification/NotificationTest.java
    incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/TaskTest.java
    incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/TaskTestITCase.java
    incubator/syncope/trunk/core/src/test/resources/content.xml

Modified: incubator/syncope/trunk/client/src/main/java/org/apache/syncope/client/to/SyncTaskTO.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/apache/syncope/client/to/SyncTaskTO.java?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/apache/syncope/client/to/SyncTaskTO.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/apache/syncope/client/to/SyncTaskTO.java Tue Oct 23 07:49:23 2012
@@ -36,7 +36,7 @@ public class SyncTaskTO extends SchedTas
 
     private boolean fullReconciliation;
 
-    private String jobActionsClassName;
+    private String actionsClassName;
 
     public UserTO getUserTemplate() {
         return userTemplate;
@@ -94,11 +94,11 @@ public class SyncTaskTO extends SchedTas
         this.fullReconciliation = fullReconciliation;
     }
 
-    public String getJobActionsClassName() {
-        return jobActionsClassName;
+    public String getActionsClassName() {
+        return actionsClassName;
     }
 
-    public void setJobActionsClassName(String jobActionsClassName) {
-        this.jobActionsClassName = jobActionsClassName;
+    public void setActionsClassName(String actionsClassName) {
+        this.actionsClassName = actionsClassName;
     }
 }

Modified: incubator/syncope/trunk/client/src/main/java/org/apache/syncope/types/AuditElements.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/client/src/main/java/org/apache/syncope/types/AuditElements.java?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/client/src/main/java/org/apache/syncope/types/AuditElements.java (original)
+++ incubator/syncope/trunk/client/src/main/java/org/apache/syncope/types/AuditElements.java Tue Oct 23 07:49:23 2012
@@ -198,7 +198,7 @@ public final class AuditElements {
         delete,
         listExecutions,
         getJobClasses,
-        getJobActionClasses,
+        getSyncActionsClasses,
         readExecution,
         execute,
         report,

Modified: incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/SyncTaskModalPage.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/SyncTaskModalPage.java?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/SyncTaskModalPage.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/SyncTaskModalPage.java Tue Oct 23 07:49:23 2012
@@ -20,18 +20,18 @@ package org.apache.syncope.console.pages
 
 import java.util.ArrayList;
 import java.util.List;
-import org.apache.wicket.PageReference;
-import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.LoadableDetachableModel;
-import org.apache.wicket.model.PropertyModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
 import org.apache.syncope.client.to.ResourceTO;
 import org.apache.syncope.client.to.SyncTaskTO;
 import org.apache.syncope.console.commons.SelectChoiceRenderer;
 import org.apache.syncope.console.rest.ResourceRestClient;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.wicket.PageReference;
+import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.LoadableDetachableModel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.spring.injection.annot.SpringBean;
 
 /**
  * Modal window with Task form (to stop and start execution).
@@ -79,12 +79,12 @@ public class SyncTaskModalPage extends A
 
             @Override
             protected List<String> load() {
-                return taskRestClient.getJobActionsClasses();
+                return taskRestClient.getSyncActionsClasses();
             }
         };
 
         final AjaxDropDownChoicePanel<String> actionsClassName = new AjaxDropDownChoicePanel<String>(
-                "jobActionsClassName", getString("actionsClass"), new PropertyModel(taskTO, "jobActionsClassName"));
+                "actionsClassName", getString("actionsClass"), new PropertyModel(taskTO, "actionsClassName"));
         actionsClassName.setChoices(classNames.getObject());
         actionsClassName.setStyleShet("ui-widget-content ui-corner-all long_dynamicsize");
         profile.add(actionsClassName);

Modified: incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/TaskRestClient.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/TaskRestClient.java?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/TaskRestClient.java (original)
+++ incubator/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/TaskRestClient.java Tue Oct 23 07:49:23 2012
@@ -54,14 +54,14 @@ public class TaskRestClient extends Abst
         return jobClasses;
     }
 
-    public List<String> getJobActionsClasses() {
+    public List<String> getSyncActionsClasses() {
         List<String> actions = null;
 
         try {
             actions = Arrays.asList(SyncopeSession.get().getRestTemplate().getForObject(
-                    baseURL + "task/jobActionsClasses.json", String[].class));
+                    baseURL + "task/syncActionsClasses.json", String[].class));
         } catch (SyncopeClientCompositeErrorException e) {
-            LOG.error("While getting all job actions classes", e);
+            LOG.error("While getting all sync actions classes", e);
         }
         return actions;
     }

Modified: incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SyncTaskModalPage.html
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SyncTaskModalPage.html?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SyncTaskModalPage.html (original)
+++ incubator/syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/SyncTaskModalPage.html Tue Oct 23 07:49:23 2012
@@ -104,10 +104,10 @@
 
                 <div class="tablerow">
                   <div class="tablecolumn_label short_dynamicsize">
-                    <label for="jobActionsClassName"><wicket:message key="actionsClass"/></label>
+                    <label for="actionsClassName"><wicket:message key="actionsClass"/></label>
                   </div>
                   <div class="tablecolumn_field medium_dynamicsize">
-                    <span wicket:id="jobActionsClassName">[jobActionsClassName]</span>
+                    <span wicket:id="actionsClassName">[actionsClassName]</span>
                   </div>
                 </div>
 

Modified: incubator/syncope/trunk/core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/pom.xml?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/pom.xml (original)
+++ incubator/syncope/trunk/core/pom.xml Tue Oct 23 07:49:23 2012
@@ -484,7 +484,8 @@ under the License.
                     <exclude name="**/workflow.properties" />
                   </patternset>
                 </unzip>
-                <copy file="${project.build.directory}/test-classes/org/apache/syncope/core/scheduling/TestSyncJobActions.class" todir="${cargo.run.dir}/WEB-INF/classes/org/apache/syncope/core/scheduling" />
+                <copy file="${project.build.directory}/test-classes/org/apache/syncope/core/quartz/TestSyncActions.class" 
+                      todir="${cargo.run.dir}/WEB-INF/classes/org/apache/syncope/core/quartz" />
                 <copy file="${project.build.directory}/test-classes/db.jsp" todir="${cargo.run.dir}" />
                 <copy todir="${cargo.run.dir}/WEB-INF/classes" includeEmptyDirs="false">
                   <fileset dir="${project.build.directory}/test-classes">

Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/ImplementationClassNamesLoader.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/ImplementationClassNamesLoader.java?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/ImplementationClassNamesLoader.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/ImplementationClassNamesLoader.java Tue Oct 23 07:49:23 2012
@@ -26,10 +26,10 @@ import java.util.Map;
 import java.util.Set;
 import org.apache.syncope.core.persistence.validation.attrvalue.Validator;
 import org.apache.syncope.core.report.Reportlet;
-import org.apache.syncope.core.scheduling.NotificationJob;
-import org.apache.syncope.core.scheduling.ReportJob;
-import org.apache.syncope.core.scheduling.SyncJob;
-import org.apache.syncope.core.scheduling.SyncJobActions;
+import org.apache.syncope.core.notification.NotificationJob;
+import org.apache.syncope.core.report.ReportJob;
+import org.apache.syncope.core.sync.SyncJob;
+import org.apache.syncope.core.sync.SyncActions;
 import org.quartz.Job;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -51,7 +51,7 @@ public class ImplementationClassNamesLoa
 
         REPORTLET,
         JOB,
-        JOB_ACTIONS,
+        SYNC_ACTIONS,
         VALIDATOR
 
     }
@@ -94,8 +94,8 @@ public class ImplementationClassNamesLoa
                         classNames.get(Type.JOB).add(metadata.getClassName());
                     }
 
-                    if (interfaces.contains(SyncJobActions.class) && !metadata.isAbstract()) {
-                        classNames.get(Type.JOB_ACTIONS).add(metadata.getClassName());
+                    if (interfaces.contains(SyncActions.class) && !metadata.isAbstract()) {
+                        classNames.get(Type.SYNC_ACTIONS).add(metadata.getClassName());
                     }
 
                     if (interfaces.contains(Validator.class) && !metadata.isAbstract()) {

Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/JobInstanceLoader.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/JobInstanceLoader.java?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/JobInstanceLoader.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/init/JobInstanceLoader.java Tue Oct 23 07:49:23 2012
@@ -32,12 +32,12 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.persistence.dao.ConfDAO;
 import org.apache.syncope.core.persistence.dao.ReportDAO;
 import org.apache.syncope.core.persistence.dao.TaskDAO;
-import org.apache.syncope.core.scheduling.AbstractTaskJob;
-import org.apache.syncope.core.scheduling.DefaultSyncJobActions;
-import org.apache.syncope.core.scheduling.NotificationJob;
-import org.apache.syncope.core.scheduling.ReportJob;
-import org.apache.syncope.core.scheduling.SyncJob;
-import org.apache.syncope.core.scheduling.SyncJobActions;
+import org.apache.syncope.core.quartz.AbstractTaskJob;
+import org.apache.syncope.core.sync.DefaultSyncActions;
+import org.apache.syncope.core.notification.NotificationJob;
+import org.apache.syncope.core.report.ReportJob;
+import org.apache.syncope.core.sync.SyncJob;
+import org.apache.syncope.core.sync.SyncActions;
 import org.apache.syncope.core.util.ApplicationContextProvider;
 import org.quartz.Job;
 import org.quartz.JobExecutionContext;
@@ -172,20 +172,20 @@ public class JobInstanceLoader {
             ((AbstractTaskJob) jobInstance).setTaskId(task.getId());
         }
         if (jobInstance instanceof SyncJob && task instanceof SyncTask) {
-            String jobActionsClassName = ((SyncTask) task).getJobActionsClassName();
-            Class syncJobActionsClass = DefaultSyncJobActions.class;
+            String jobActionsClassName = ((SyncTask) task).getActionsClassName();
+            Class syncActionsClass = DefaultSyncActions.class;
             if (StringUtils.isNotBlank(jobActionsClassName)) {
                 try {
-                    syncJobActionsClass = Class.forName(jobActionsClassName);
+                    syncActionsClass = Class.forName(jobActionsClassName);
                 } catch (Exception e) {
                     LOG.error("Class {} not found, reverting to {}", new Object[]{jobActionsClassName,
-                                syncJobActionsClass.getName(), e});
+                                syncActionsClass.getName(), e});
                 }
             }
-            SyncJobActions syncJobActions = (SyncJobActions) getBeanFactory().createBean(syncJobActionsClass,
+            SyncActions syncActions = (SyncActions) getBeanFactory().createBean(syncActionsClass,
                     AbstractBeanDefinition.AUTOWIRE_BY_TYPE, true);
 
-            ((SyncJob) jobInstance).setActions(syncJobActions);
+            ((SyncJob) jobInstance).setActions(syncActions);
         }
 
         registerJob(getJobName(task), jobInstance, cronExpression);

Copied: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationJob.java (from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/NotificationJob.java)
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationJob.java?p2=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationJob.java&p1=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/NotificationJob.java&r1=1400893&r2=1401182&rev=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/NotificationJob.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationJob.java Tue Oct 23 07:49:23 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.syncope.core.scheduling;
+package org.apache.syncope.core.notification;
 
 import java.io.PrintWriter;
 import java.io.StringWriter;

Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/notification/NotificationManager.java Tue Oct 23 07:49:23 2012
@@ -39,7 +39,6 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.persistence.dao.UserDAO;
 import org.apache.syncope.core.persistence.dao.UserSearchDAO;
 import org.apache.syncope.core.rest.data.UserDataBinder;
-import org.apache.syncope.core.scheduling.NotificationJob;
 import org.apache.syncope.core.util.ConnObjectUtil;
 import org.apache.syncope.core.util.EntitlementUtil;
 import org.apache.syncope.core.util.NotFoundException;

Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/SyncTask.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/SyncTask.java?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/SyncTask.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/beans/SyncTask.java Tue Oct 23 07:49:23 2012
@@ -27,7 +27,7 @@ import javax.validation.constraints.Min;
 import org.apache.syncope.client.to.UserTO;
 import org.apache.syncope.client.util.XMLSerializer;
 import org.apache.syncope.core.persistence.validation.entity.SyncTaskCheck;
-import org.apache.syncope.core.scheduling.SyncJob;
+import org.apache.syncope.core.sync.SyncJob;
 
 @Entity
 @SyncTaskCheck
@@ -69,7 +69,7 @@ public class SyncTask extends SchedTask 
     @Max(1)
     private Integer fullReconciliation;
 
-    private String jobActionsClassName;
+    private String actionsClassName;
 
     /**
      * Default constructor.
@@ -95,7 +95,7 @@ public class SyncTask extends SchedTask 
     public UserTO getUserTemplate() {
         return userTemplate == null
                 ? new UserTO()
-                : XMLSerializer.<UserTO> deserialize(userTemplate);
+                : XMLSerializer.<UserTO>deserialize(userTemplate);
     }
 
     public void setUserTemplate(final UserTO userTemplate) {
@@ -142,11 +142,11 @@ public class SyncTask extends SchedTask 
         this.fullReconciliation = getBooleanAsInteger(fullReconciliation);
     }
 
-    public String getJobActionsClassName() {
-        return jobActionsClassName;
+    public String getActionsClassName() {
+        return actionsClassName;
     }
 
-    public void setJobActionsClassName(String jobActionsClassName) {
-        this.jobActionsClassName = jobActionsClassName;
+    public void setActionsClassName(String actionsClassName) {
+        this.actionsClassName = actionsClassName;
     }
 }

Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ReportExecDAOImpl.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ReportExecDAOImpl.java?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ReportExecDAOImpl.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ReportExecDAOImpl.java Tue Oct 23 07:49:23 2012
@@ -67,7 +67,7 @@ public class ReportExecDAOImpl extends A
     /**
      * This method is annotated as transactional because called from ReportJob.
      *
-     * @see org.apache.syncope.core.scheduling.ReportJob
+     * @see org.apache.syncope.core.report.ReportJob
      * @param execution to be merged
      * @return merged execution
      * @throws InvalidEntityException if any validation error occurs
@@ -75,7 +75,6 @@ public class ReportExecDAOImpl extends A
     @Override
     @Transactional(rollbackFor = Throwable.class)
     public ReportExec save(final ReportExec execution) throws InvalidEntityException {
-
         return entityManager.merge(execution);
     }
 

Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ResourceDAOImpl.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ResourceDAOImpl.java?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ResourceDAOImpl.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/ResourceDAOImpl.java Tue Oct 23 07:49:23 2012
@@ -83,16 +83,15 @@ public class ResourceDAOImpl extends Abs
     }
 
     /**
-     * This method has an explicit @Transactional annotation because it is
-     * called by SyncJob.
+     * This method has an explicit Transactional annotation because it is called by SyncJob.
      *
-     * @see org.apache.syncope.core.scheduling.SyncJob
+     * @see org.apache.syncope.core.sync.SyncJob
      *
      * @param resource entity to be merged
      * @return the same entity, updated
      */
     @Override
-    @Transactional(rollbackFor = { Throwable.class })
+    @Transactional(rollbackFor = {Throwable.class})
     public ExternalResource save(final ExternalResource resource) {
         ExternalResource merged = entityManager.merge(resource);
         try {

Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/TaskExecDAOImpl.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/TaskExecDAOImpl.java?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/TaskExecDAOImpl.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/dao/impl/TaskExecDAOImpl.java Tue Oct 23 07:49:23 2012
@@ -85,16 +85,17 @@ public class TaskExecDAOImpl extends Abs
     }
 
     /**
-     * This method has an explicit @Transactional annotation because it is called by AbstractJob.
+     * This method has an explicit Transactional annotation because it is called by AbstractJob.
      *
-     * @see org.apache.syncope.core.scheduling.AbstractJob
+     * @see AbstractJob
      *
-     * @param execution entity to be merged
-     * @return the same entity, updated
+     * @param taskId task id
+     * @param execution task execution
+     * @throws InvalidEntityException if any bean validation fails
      */
     @Override
     @Transactional(rollbackFor = {Throwable.class})
-    public void saveAndAdd(Long taskId, TaskExec execution) throws InvalidEntityException {
+    public void saveAndAdd(final Long taskId, final TaskExec execution) throws InvalidEntityException {
         Task task = taskDAO.find(taskId);
         task.addExec(execution);
         taskDAO.save(task);

Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/SchedTaskValidator.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/SchedTaskValidator.java?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/SchedTaskValidator.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/SchedTaskValidator.java Tue Oct 23 07:49:23 2012
@@ -22,7 +22,7 @@ import java.text.ParseException;
 import javax.validation.ConstraintValidator;
 import javax.validation.ConstraintValidatorContext;
 import org.apache.syncope.core.persistence.beans.SchedTask;
-import org.apache.syncope.core.scheduling.AbstractTaskJob;
+import org.apache.syncope.core.quartz.AbstractTaskJob;
 import org.apache.syncope.types.EntityViolationType;
 import org.quartz.CronExpression;
 

Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/SyncTaskValidator.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/SyncTaskValidator.java?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/SyncTaskValidator.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/persistence/validation/entity/SyncTaskValidator.java Tue Oct 23 07:49:23 2012
@@ -22,7 +22,7 @@ import javax.validation.ConstraintValida
 import javax.validation.ConstraintValidatorContext;
 import org.apache.commons.lang.StringUtils;
 import org.apache.syncope.core.persistence.beans.SyncTask;
-import org.apache.syncope.core.scheduling.SyncJobActions;
+import org.apache.syncope.core.sync.SyncActions;
 import org.apache.syncope.types.EntityViolationType;
 
 public class SyncTaskValidator extends AbstractValidator implements ConstraintValidator<SyncTaskCheck, SyncTask> {
@@ -59,23 +59,23 @@ public class SyncTaskValidator extends A
                             .addNode(object + ".resource is NULL").addConstraintViolation();
                 }
 
-                if (StringUtils.isNotBlank(object.getJobActionsClassName())) {
-                    Class<?> syncJobActionsClass = null;
+                if (StringUtils.isNotBlank(object.getActionsClassName())) {
+                    Class<?> syncActionsClass = null;
                     boolean isAssignable = false;
                     try {
-                        syncJobActionsClass = Class.forName(object.getJobActionsClassName());
-                        isAssignable = SyncJobActions.class.isAssignableFrom(syncJobActionsClass);
+                        syncActionsClass = Class.forName(object.getActionsClassName());
+                        isAssignable = SyncActions.class.isAssignableFrom(syncActionsClass);
                     } catch (Exception e) {
-                        LOG.error("Invalid SyncJobActions specified", e);
+                        LOG.error("Invalid SyncActions specified", e);
                         isValid = false;
                     }
 
-                    if (syncJobActionsClass == null || !isAssignable) {
+                    if (syncActionsClass == null || !isAssignable) {
                         isValid = false;
 
                         context.disableDefaultConstraintViolation();
                         context.buildConstraintViolationWithTemplate(EntityViolationType.InvalidSyncTask.toString())
-                                .addNode(object + ".syncJobActionsClassName is not valid").addConstraintViolation();
+                                .addNode(object + ".actionsClassName is not valid").addConstraintViolation();
                     }
                 }
             }

Copied: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/AbstractTaskJob.java (from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/AbstractTaskJob.java)
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/AbstractTaskJob.java?p2=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/AbstractTaskJob.java&p1=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/AbstractTaskJob.java&r1=1400893&r2=1401182&rev=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/AbstractTaskJob.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/AbstractTaskJob.java Tue Oct 23 07:49:23 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.syncope.core.scheduling;
+package org.apache.syncope.core.quartz;
 
 import java.io.PrintWriter;
 import java.io.StringWriter;

Copied: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/SampleJob.java (from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SampleJob.java)
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/SampleJob.java?p2=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/SampleJob.java&p1=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SampleJob.java&r1=1400893&r2=1401182&rev=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SampleJob.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/SampleJob.java Tue Oct 23 07:49:23 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.syncope.core.scheduling;
+package org.apache.syncope.core.quartz;
 
 import org.quartz.JobExecutionException;
 import org.apache.syncope.core.persistence.beans.SchedTask;

Copied: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/SpringBeanJobFactory.java (from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SpringBeanJobFactory.java)
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/SpringBeanJobFactory.java?p2=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/SpringBeanJobFactory.java&p1=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SpringBeanJobFactory.java&r1=1400893&r2=1401182&rev=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SpringBeanJobFactory.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/SpringBeanJobFactory.java Tue Oct 23 07:49:23 2012
@@ -16,8 +16,13 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.syncope.core.scheduling;
+package org.apache.syncope.core.quartz;
 
+import org.apache.syncope.core.init.JobInstanceLoader;
+import org.apache.syncope.core.persistence.beans.Report;
+import org.apache.syncope.core.persistence.beans.SchedTask;
+import org.apache.syncope.core.persistence.dao.ReportDAO;
+import org.apache.syncope.core.persistence.dao.TaskDAO;
 import org.quartz.SchedulerContext;
 import org.quartz.spi.TriggerFiredBundle;
 import org.springframework.beans.BeanWrapper;
@@ -25,11 +30,6 @@ import org.springframework.beans.Mutable
 import org.springframework.beans.PropertyAccessorFactory;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ConfigurableApplicationContext;
-import org.apache.syncope.core.init.JobInstanceLoader;
-import org.apache.syncope.core.persistence.beans.Report;
-import org.apache.syncope.core.persistence.beans.SchedTask;
-import org.apache.syncope.core.persistence.dao.ReportDAO;
-import org.apache.syncope.core.persistence.dao.TaskDAO;
 
 public class SpringBeanJobFactory extends org.springframework.scheduling.quartz.SpringBeanJobFactory {
 

Copied: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/package-info.java (from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/package-info.java)
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/package-info.java?p2=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/package-info.java&p1=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/package-info.java&r1=1400893&r2=1401182&rev=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/package-info.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/quartz/package-info.java Tue Oct 23 07:49:23 2012
@@ -16,5 +16,5 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.syncope.core.scheduling;
+package org.apache.syncope.core.quartz;
 

Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/AbstractReportlet.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/AbstractReportlet.java?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/AbstractReportlet.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/AbstractReportlet.java Tue Oct 23 07:49:23 2012
@@ -24,7 +24,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.transaction.annotation.Transactional;
 import org.apache.syncope.client.SyncopeConstants;
 import org.apache.syncope.client.report.AbstractReportletConf;
-import static org.apache.syncope.core.scheduling.ReportXMLConst.*;
+import static org.apache.syncope.core.report.ReportXMLConst.*;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.AttributesImpl;

Copied: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/ReportJob.java (from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/ReportJob.java)
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/ReportJob.java?p2=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/ReportJob.java&p1=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/ReportJob.java&r1=1400893&r2=1401182&rev=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/ReportJob.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/ReportJob.java Tue Oct 23 07:49:23 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.syncope.core.scheduling;
+package org.apache.syncope.core.report;
 
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -39,9 +39,9 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.report.ReportException;
 import org.apache.syncope.core.report.Reportlet;
 import org.apache.syncope.core.rest.data.ReportDataBinder;
-import static org.apache.syncope.core.scheduling.ReportXMLConst.ATTR_NAME;
-import static org.apache.syncope.core.scheduling.ReportXMLConst.ELEMENT_REPORT;
-import static org.apache.syncope.core.scheduling.ReportXMLConst.XSD_STRING;
+import static org.apache.syncope.core.report.ReportXMLConst.ATTR_NAME;
+import static org.apache.syncope.core.report.ReportXMLConst.ELEMENT_REPORT;
+import static org.apache.syncope.core.report.ReportXMLConst.XSD_STRING;
 import org.apache.syncope.core.util.ApplicationContextProvider;
 import org.apache.syncope.types.ReportExecStatus;
 import org.quartz.DisallowConcurrentExecution;

Copied: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/ReportXMLConst.java (from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/ReportXMLConst.java)
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/ReportXMLConst.java?p2=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/ReportXMLConst.java&p1=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/ReportXMLConst.java&r1=1400893&r2=1401182&rev=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/ReportXMLConst.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/ReportXMLConst.java Tue Oct 23 07:49:23 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.syncope.core.scheduling;
+package org.apache.syncope.core.report;
 
 public class ReportXMLConst {
 

Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/UserReportlet.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/UserReportlet.java?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/UserReportlet.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/report/UserReportlet.java Tue Oct 23 07:49:23 2012
@@ -36,7 +36,7 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.persistence.dao.UserSearchDAO;
 import org.apache.syncope.core.rest.data.RoleDataBinder;
 import org.apache.syncope.core.rest.data.UserDataBinder;
-import static org.apache.syncope.core.scheduling.ReportXMLConst.*;
+import static org.apache.syncope.core.report.ReportXMLConst.*;
 import org.apache.syncope.core.util.EntitlementUtil;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;

Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/TaskController.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/TaskController.java?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/TaskController.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/TaskController.java Tue Oct 23 07:49:23 2012
@@ -41,8 +41,8 @@ import org.apache.syncope.core.persisten
 import org.apache.syncope.core.persistence.dao.TaskExecDAO;
 import org.apache.syncope.core.propagation.PropagationTaskExecutor;
 import org.apache.syncope.core.rest.data.TaskDataBinder;
-import org.apache.syncope.core.scheduling.AbstractTaskJob;
-import org.apache.syncope.core.scheduling.NotificationJob;
+import org.apache.syncope.core.quartz.AbstractTaskJob;
+import org.apache.syncope.core.notification.NotificationJob;
 import org.apache.syncope.core.util.NotFoundException;
 import org.apache.syncope.core.util.TaskUtil;
 import org.apache.syncope.types.AuditElements.Category;
@@ -250,14 +250,14 @@ public class TaskController extends Abst
     }
 
     @PreAuthorize("hasRole('TASK_LIST')")
-    @RequestMapping(method = RequestMethod.GET, value = "/jobActionsClasses")
-    public ModelAndView getJobActionClasses() {
-        Set<String> jobActionsClasses = classNamesLoader.getClassNames(ImplementationClassNamesLoader.Type.JOB_ACTIONS);
+    @RequestMapping(method = RequestMethod.GET, value = "/syncActionsClasses")
+    public ModelAndView getSyncActionsClasses() {
+        Set<String> actionsClasses = classNamesLoader.getClassNames(ImplementationClassNamesLoader.Type.SYNC_ACTIONS);
 
-        auditManager.audit(Category.task, TaskSubCategory.getJobActionClasses, Result.success,
-                "Successfully listed all SyncJobActions classes: " + jobActionsClasses.size());
+        auditManager.audit(Category.task, TaskSubCategory.getSyncActionsClasses, Result.success,
+                "Successfully listed all SyncActions classes: " + actionsClasses.size());
 
-        return new ModelAndView().addObject(jobActionsClasses);
+        return new ModelAndView().addObject(actionsClasses);
     }
 
     @PreAuthorize("hasRole('TASK_READ')")

Modified: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/TaskDataBinder.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/TaskDataBinder.java?rev=1401182&r1=1401181&r2=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/TaskDataBinder.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/data/TaskDataBinder.java Tue Oct 23 07:49:23 2012
@@ -135,7 +135,7 @@ public class TaskDataBinder {
         task.setSyncStatus(taskTO.isSyncStatus());
         task.setFullReconciliation(taskTO.isFullReconciliation());
 
-        task.setJobActionsClassName(taskTO.getJobActionsClassName());
+        task.setActionsClassName(taskTO.getActionsClassName());
     }
 
     public SchedTask createSchedTask(final SchedTaskTO taskTO, final TaskUtil taskUtil)

Copied: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/DefaultSyncActions.java (from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/DefaultSyncJobActions.java)
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/DefaultSyncActions.java?p2=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/DefaultSyncActions.java&p1=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/DefaultSyncJobActions.java&r1=1400893&r2=1401182&rev=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/DefaultSyncJobActions.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/DefaultSyncActions.java Tue Oct 23 07:49:23 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.syncope.core.scheduling;
+package org.apache.syncope.core.sync;
 
 import java.util.List;
 import org.apache.syncope.client.mod.UserMod;
@@ -26,11 +26,11 @@ import org.identityconnectors.framework.
 import org.quartz.JobExecutionException;
 
 /**
- * Default (empty) implementation of SyncJobActions.
+ * Default (empty) implementation of SyncActions.
  *
- * @see SyncJobActions
+ * @see SyncActions
  */
-public class DefaultSyncJobActions implements SyncJobActions {
+public class DefaultSyncActions implements SyncActions {
 
     @Override
     public void beforeAll(final SyncTask task) throws JobExecutionException {

Copied: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/SyncActions.java (from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SyncJobActions.java)
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/SyncActions.java?p2=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/SyncActions.java&p1=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SyncJobActions.java&r1=1400893&r2=1401182&rev=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SyncJobActions.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/SyncActions.java Tue Oct 23 07:49:23 2012
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.syncope.core.scheduling;
+package org.apache.syncope.core.sync;
 
 import java.util.List;
 import org.apache.syncope.client.mod.UserMod;
@@ -28,7 +28,7 @@ import org.quartz.JobExecutionException;
 /**
  * Interface for actions to be performed during SyncJob execution.
  */
-public interface SyncJobActions {
+public interface SyncActions {
 
     /**
      * Action to be executed before to start the synchronization task execution.

Copied: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/SyncJob.java (from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SyncJob.java)
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/SyncJob.java?p2=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/SyncJob.java&p1=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SyncJob.java&r1=1400893&r2=1401182&rev=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SyncJob.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/SyncJob.java Tue Oct 23 07:49:23 2012
@@ -16,59 +16,32 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.syncope.core.scheduling;
+package org.apache.syncope.core.sync;
 
 import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
-import org.apache.syncope.client.mod.UserMod;
-import org.apache.syncope.client.search.AttributeCond;
-import org.apache.syncope.client.search.NodeCond;
-import org.apache.syncope.client.search.SyncopeUserCond;
-import org.apache.syncope.client.to.UserTO;
 import org.apache.syncope.core.init.ConnInstanceLoader;
-import org.apache.syncope.core.notification.NotificationManager;
 import org.apache.syncope.core.persistence.beans.Entitlement;
 import org.apache.syncope.core.persistence.beans.ExternalResource;
-import org.apache.syncope.core.persistence.beans.PropagationTask;
 import org.apache.syncope.core.persistence.beans.SchemaMapping;
 import org.apache.syncope.core.persistence.beans.SyncPolicy;
 import org.apache.syncope.core.persistence.beans.SyncTask;
 import org.apache.syncope.core.persistence.beans.TaskExec;
-import org.apache.syncope.core.persistence.beans.user.SyncopeUser;
-import org.apache.syncope.core.persistence.beans.user.UAttrValue;
 import org.apache.syncope.core.persistence.dao.EntitlementDAO;
 import org.apache.syncope.core.persistence.dao.ResourceDAO;
-import org.apache.syncope.core.persistence.dao.UserDAO;
-import org.apache.syncope.core.persistence.dao.UserSearchDAO;
 import org.apache.syncope.core.propagation.ConnectorFacadeProxy;
-import org.apache.syncope.core.propagation.PropagationException;
-import org.apache.syncope.core.propagation.PropagationManager;
-import org.apache.syncope.core.propagation.PropagationTaskExecutor;
-import org.apache.syncope.core.rest.controller.InvalidSearchConditionException;
-import org.apache.syncope.core.rest.controller.UnauthorizedRoleException;
-import org.apache.syncope.core.rest.data.UserDataBinder;
-import org.apache.syncope.core.scheduling.SyncResult.Operation;
-import org.apache.syncope.core.util.ConnObjectUtil;
+import org.apache.syncope.core.quartz.AbstractTaskJob;
+import org.apache.syncope.core.util.ApplicationContextProvider;
 import org.apache.syncope.core.util.EntitlementUtil;
-import org.apache.syncope.core.util.NotFoundException;
 import org.apache.syncope.core.util.SchemaMappingUtil;
-import org.apache.syncope.core.workflow.UserWorkflowAdapter;
-import org.apache.syncope.core.workflow.WorkflowResult;
 import org.apache.syncope.types.ConflictResolutionAction;
 import org.apache.syncope.types.SyncPolicySpec;
 import org.apache.syncope.types.TraceLevel;
-import org.identityconnectors.framework.common.objects.Attribute;
-import org.identityconnectors.framework.common.objects.AttributeUtil;
 import org.identityconnectors.framework.common.objects.ObjectClass;
-import org.identityconnectors.framework.common.objects.OperationalAttributes;
-import org.identityconnectors.framework.common.objects.SyncDelta;
-import org.identityconnectors.framework.common.objects.SyncResultsHandler;
 import org.quartz.JobExecutionException;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.support.AbstractBeanDefinition;
+import org.springframework.beans.factory.support.DefaultListableBeanFactory;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 import org.springframework.security.core.GrantedAuthority;
 import org.springframework.security.core.authority.SimpleGrantedAuthority;
@@ -79,7 +52,7 @@ import org.springframework.security.core
 /**
  * Job for executing synchronization tasks.
  *
- * @see org.apache.syncope.core.scheduling.Job
+ * @see AbstractTaskJob
  * @see SyncTask
  */
 public class SyncJob extends AbstractTaskJob {
@@ -97,377 +70,21 @@ public class SyncJob extends AbstractTas
     private ResourceDAO resourceDAO;
 
     /**
-     * User DAO.
-     */
-    @Autowired
-    private UserDAO userDAO;
-
-    /**
-     * User DAO.
-     */
-    @Autowired
-    private UserSearchDAO userSearchDAO;
-
-    /**
      * Entitlement DAO.
      */
     @Autowired
     private EntitlementDAO entitlementDAO;
 
     /**
-     * User workflow adapter.
-     */
-    @Autowired
-    private UserWorkflowAdapter wfAdapter;
-
-    /**
-     * Propagation Manager.
-     */
-    @Autowired
-    private PropagationManager propagationManager;
-
-    /**
-     * PropagationTask executor.
-     */
-    @Autowired
-    private PropagationTaskExecutor taskExecutor;
-
-    /**
-     * User data binder.
-     */
-    @Autowired
-    private UserDataBinder userDataBinder;
-
-    /**
      * SyncJob actions.
      */
-    private SyncJobActions actions;
-
-    /**
-     * ConnectorObject util.
-     */
-    @Autowired
-    private ConnObjectUtil connObjectUtil;
+    private SyncActions actions;
 
-    /**
-     * Notification Manager.
-     */
-    @Autowired
-    private NotificationManager notificationManager;
-
-    public void setActions(final SyncJobActions actions) {
+    public void setActions(final SyncActions actions) {
         this.actions = actions;
     }
 
     /**
-     * Find users based on mapped uid value (or previous uid value, if updated).
-     *
-     * @param delta sync delta
-     * @return list of matching users
-     */
-    private List<Long> findExistingUsers(final SyncDelta delta) {
-        final SyncTask syncTask = (SyncTask) this.task;
-
-        final String uid = delta.getPreviousUid() == null
-                ? delta.getUid().getUidValue()
-                : delta.getPreviousUid().getUidValue();
-
-        // ---------------------------------
-        // Get sync policy specification
-        // ---------------------------------
-        SyncPolicySpec policySpec = null;
-        if (syncTask.getResource().getSyncPolicy() != null) {
-            policySpec = (SyncPolicySpec) syncTask.getResource().getSyncPolicy().getSpecification();
-        }
-        // ---------------------------------
-
-        final List<Long> result = new ArrayList<Long>();
-
-        if (policySpec == null || policySpec.getAlternativeSearchAttrs().isEmpty()) {
-            SyncopeUser found;
-            List<SyncopeUser> users;
-
-            final SchemaMapping accountIdMap =
-                    SchemaMappingUtil.getAccountIdMapping(syncTask.getResource().getMappings());
-            switch (accountIdMap.getIntMappingType()) {
-                case Username:
-                    found = userDAO.find(uid);
-                    if (found != null) {
-                        result.add(found.getId());
-                    }
-                    break;
-
-                case SyncopeUserId:
-                    found = userDAO.find(Long.parseLong(uid));
-                    if (found != null) {
-                        result.add(found.getId());
-                    }
-                    break;
-
-                case UserSchema:
-                    final UAttrValue value = new UAttrValue();
-                    value.setStringValue(uid);
-                    users = userDAO.findByAttrValue(accountIdMap.getIntAttrName(), value);
-                    for (SyncopeUser user : users) {
-                        result.add(user.getId());
-                    }
-                    break;
-
-                case UserDerivedSchema:
-                    try {
-                        users = userDAO.findByDerAttrValue(accountIdMap.getIntAttrName(), uid);
-                        for (SyncopeUser user : users) {
-                            result.add(user.getId());
-                        }
-                    } catch (InvalidSearchConditionException e) {
-                        LOG.error("Could not search for matching users", e);
-                    }
-                    break;
-
-                default:
-                    LOG.error("Invalid accountId type '{}'", accountIdMap.getIntMappingType());
-            }
-        } else {
-            // search for external attribute's name/value of each specified name
-
-            final Map<String, Attribute> extValues = new HashMap<String, Attribute>();
-
-            for (SchemaMapping mapping : syncTask.getResource().getMappings()) {
-                extValues.put(SchemaMappingUtil.getIntAttrName(mapping),
-                        delta.getObject().getAttributeByName(SchemaMappingUtil.getExtAttrName(mapping)));
-            }
-
-            // search for user by attribute(s) specified in the policy
-            NodeCond searchCond = null;
-
-            for (String schema : policySpec.getAlternativeSearchAttrs()) {
-                Attribute value = extValues.get(schema);
-
-                AttributeCond.Type type;
-                String expression = null;
-
-                if (value == null || value.getValue() == null || value.getValue().isEmpty()) {
-                    type = AttributeCond.Type.ISNULL;
-                } else {
-                    type = AttributeCond.Type.EQ;
-                    expression = value.getValue().size() > 1
-                            ? value.getValue().toString()
-                            : value.getValue().get(0).toString();
-                }
-
-                NodeCond nodeCond;
-                // just Username or SyncopeUserId can be selected to be used
-                if ("id".equalsIgnoreCase(schema) || "username".equalsIgnoreCase(schema)) {
-                    SyncopeUserCond cond = new SyncopeUserCond();
-                    cond.setSchema(schema);
-                    cond.setType(type);
-                    cond.setExpression(expression);
-
-                    nodeCond = NodeCond.getLeafCond(cond);
-                } else {
-                    AttributeCond cond = new AttributeCond();
-                    cond.setSchema(schema);
-                    cond.setType(type);
-                    cond.setExpression(expression);
-
-                    nodeCond = NodeCond.getLeafCond(cond);
-                }
-
-                searchCond = searchCond == null
-                        ? nodeCond
-                        : NodeCond.getAndCond(searchCond, nodeCond);
-            }
-
-            final List<SyncopeUser> users =
-                    userSearchDAO.search(EntitlementUtil.getRoleIds(entitlementDAO.findAll()), searchCond);
-            for (SyncopeUser user : users) {
-                result.add(user.getId());
-            }
-        }
-
-        return result;
-    }
-
-    private List<SyncResult> createUser(SyncDelta delta, final boolean dryRun) throws JobExecutionException {
-        if (!((SyncTask) task).isPerformCreate()) {
-            LOG.debug("SyncTask not configured for create");
-            return Collections.EMPTY_LIST;
-        }
-
-        final SyncResult result = new SyncResult();
-        result.setOperation(Operation.CREATE);
-
-        UserTO userTO = connObjectUtil.getUserTO(delta.getObject(), (SyncTask) task);
-
-        delta = actions.beforeCreate(delta, userTO);
-
-        if (dryRun) {
-            result.setUserId(0L);
-            result.setUsername(userTO.getUsername());
-            result.setStatus(Status.SUCCESS);
-        } else {
-            try {
-                Boolean enabled = null;
-
-                // --------------------------
-                // Check for status synchronization ...
-                // --------------------------
-                if (((SyncTask) this.task).isSyncStatus()) {
-                    Attribute status = AttributeUtil.find(OperationalAttributes.ENABLE_NAME, delta.getObject()
-                            .getAttributes());
-
-                    if (status != null) {
-                        enabled = status.getValue() != null && !status.getValue().isEmpty()
-                                ? (Boolean) status.getValue().get(0)
-                                : null;
-                    }
-                }
-                // --------------------------
-
-                WorkflowResult<Map.Entry<Long, Boolean>> created = wfAdapter.create(userTO, true, enabled);
-
-                List<PropagationTask> tasks = propagationManager.getCreateTaskIds(created, userTO.getPassword(), userTO
-                        .getVirtualAttributes(), Collections.singleton(((SyncTask) this.task).getResource().getName()));
-
-                taskExecutor.execute(tasks);
-
-                notificationManager.createTasks(created.getResult().getKey(), created.getPerformedTasks());
-
-                userTO = userDataBinder.getUserTO(created.getResult().getKey());
-
-                result.setUserId(created.getResult().getKey());
-                result.setUsername(userTO.getUsername());
-                result.setStatus(Status.SUCCESS);
-            } catch (PropagationException e) {
-                LOG.error("Could not propagate user " + delta.getUid().getUidValue(), e);
-            } catch (Exception e) {
-                result.setStatus(Status.FAILURE);
-                result.setMessage(e.getMessage());
-                LOG.error("Could not create user " + delta.getUid().getUidValue(), e);
-            }
-        }
-
-        actions.after(delta, userTO, result);
-        return Collections.singletonList(result);
-    }
-
-    private List<SyncResult> updateUsers(SyncDelta delta, final List<Long> users, final boolean dryRun)
-            throws JobExecutionException {
-
-        if (!((SyncTask) task).isPerformUpdate()) {
-            LOG.debug("SyncTask not configured for update");
-            return Collections.EMPTY_LIST;
-        }
-
-        LOG.debug("About to update {}", users);
-
-        List<SyncResult> results = new ArrayList<SyncResult>();
-
-        for (Long userId : users) {
-            final SyncResult result = new SyncResult();
-            result.setOperation(Operation.UPDATE);
-
-            try {
-                UserTO userTO = userDataBinder.getUserTO(userId);
-                try {
-
-                    final UserMod userMod = connObjectUtil.getUserMod(userId, delta.getObject(), (SyncTask) task);
-                    delta = actions.beforeUpdate(delta, userTO, userMod);
-
-                    result.setStatus(Status.SUCCESS);
-                    result.setUserId(userMod.getId());
-                    result.setUsername(userMod.getUsername());
-
-                    if (!dryRun) {
-                        WorkflowResult<Map.Entry<Long, Boolean>> updated = wfAdapter.update(userMod);
-
-                        List<PropagationTask> tasks = propagationManager.getUpdateTaskIds(updated, userMod
-                                .getPassword(), userMod.getVirtualAttributesToBeRemoved(), userMod
-                                .getVirtualAttributesToBeUpdated(), Collections.singleton(((SyncTask) this.task)
-                                .getResource().getName()));
-
-                        taskExecutor.execute(tasks);
-
-                        notificationManager.createTasks(updated.getResult().getKey(), updated.getPerformedTasks());
-
-                        userTO = userDataBinder.getUserTO(updated.getResult().getKey());
-                    }
-                } catch (PropagationException e) {
-                    LOG.error("Could not propagate user " + delta.getUid().getUidValue(), e);
-                } catch (Exception e) {
-                    result.setStatus(Status.FAILURE);
-                    result.setMessage(e.getMessage());
-                    LOG.error("Could not update user " + delta.getUid().getUidValue(), e);
-                }
-
-                actions.after(delta, userTO, result);
-                results.add(result);
-            } catch (NotFoundException e) {
-                LOG.error("Could not find user {}", userId, e);
-            } catch (UnauthorizedRoleException e) {
-                LOG.error("Not allowed to read user {}", userId, e);
-            }
-        }
-
-        return results;
-    }
-
-    private List<SyncResult> deleteUsers(SyncDelta delta, final List<Long> users, final boolean dryRun)
-            throws JobExecutionException {
-
-        if (!((SyncTask) task).isPerformDelete()) {
-            LOG.debug("SyncTask not configured for delete");
-            return Collections.EMPTY_LIST;
-        }
-
-        LOG.debug("About to delete {}", users);
-
-        List<SyncResult> results = new ArrayList<SyncResult>();
-
-        for (Long userId : users) {
-            try {
-                UserTO userTO = userDataBinder.getUserTO(userId);
-                delta = actions.beforeDelete(delta, userTO);
-
-                final SyncResult result = new SyncResult();
-                result.setUserId(userId);
-                result.setUsername(userTO.getUsername());
-                result.setOperation(Operation.DELETE);
-                result.setStatus(Status.SUCCESS);
-
-                if (!dryRun) {
-                    try {
-                        List<PropagationTask> tasks = propagationManager.getDeleteTaskIds(userId,
-                                ((SyncTask) this.task).getResource().getName());
-                        taskExecutor.execute(tasks);
-
-                        notificationManager.createTasks(userId, Collections.singleton("delete"));
-                    } catch (Exception e) {
-                        LOG.error("Could not propagate user " + userId, e);
-                    }
-
-                    try {
-                        wfAdapter.delete(userId);
-                    } catch (Exception e) {
-                        result.setStatus(Status.FAILURE);
-                        result.setMessage(e.getMessage());
-                        LOG.error("Could not delete user " + userId, e);
-                    }
-                }
-
-                actions.after(delta, userTO, result);
-                results.add(result);
-            } catch (NotFoundException e) {
-                LOG.error("Could not find user {}", userId, e);
-            } catch (UnauthorizedRoleException e) {
-                LOG.error("Not allowed to read user {}", userId, e);
-            }
-        }
-
-        return results;
-    }
-
-    /**
      * Create a textual report of the synchronization, based on the trace level.
      *
      * @param syncResults Sync results
@@ -591,7 +208,6 @@ public class SyncJob extends AbstractTas
 
     @Override
     protected String doExecute(final boolean dryRun) throws JobExecutionException {
-
         // get all entitlements to perform updates
         if (EntitlementUtil.getOwnedEntitlementNames().isEmpty()) {
             setupSecurity();
@@ -619,22 +235,29 @@ public class SyncJob extends AbstractTas
             throw new JobExecutionException("Invalid account id mapping for resource " + syncTask.getResource());
         }
 
-        LOG.debug("Execute synchronization with token {}", syncTask.getResource().getSyncToken() != null
-                ? syncTask.getResource().getSyncToken().getValue()
-                : null);
+        LOG.debug("Execute synchronization with token {}", syncTask.getResource().getSyncToken());
 
         final List<SyncResult> results = new ArrayList<SyncResult>();
 
         actions.beforeAll(syncTask);
 
-        try {
-            final SyncPolicy syncPolicy = syncTask.getResource().getSyncPolicy();
-
-            final ConflictResolutionAction resAct = syncPolicy == null || syncPolicy.getSpecification() == null
-                    ? ConflictResolutionAction.IGNORE
-                    : ((SyncPolicySpec) syncPolicy.getSpecification()).getConflictResolutionAction();
+        final SyncPolicy syncPolicy = syncTask.getResource().getSyncPolicy();
+        final ConflictResolutionAction resAct = syncPolicy == null || syncPolicy.getSpecification() == null
+                ? ConflictResolutionAction.IGNORE
+                : ((SyncPolicySpec) syncPolicy.getSpecification()).getConflictResolutionAction();
+
+        // Prepare hanlder for SyncDelta objects
+        final SyncopeSyncResultHanlder handler =
+                (SyncopeSyncResultHanlder) ((DefaultListableBeanFactory) ApplicationContextProvider.
+                getApplicationContext().getBeanFactory()).createBean(
+                SyncopeSyncResultHanlder.class, AbstractBeanDefinition.AUTOWIRE_BY_TYPE, false);
+        handler.setActions(actions);
+        handler.setDryRun(dryRun);
+        handler.setResAct(resAct);
+        handler.setResults(results);
+        handler.setSyncTask(syncTask);
 
-            final SyncJobResultsHandler handler = new SyncJobResultsHandler(results, syncTask, resAct, dryRun);
+        try {
             if (syncTask.isFullReconciliation()) {
                 connector.getAllObjects(ObjectClass.ACCOUNT, handler,
                         connector.getOperationOptions(syncTask.getResource()));
@@ -665,89 +288,6 @@ public class SyncJob extends AbstractTas
         return result.toString();
     }
 
-    /**
-     * Handle deltas.
-     *
-     * @param syncTask sync task.
-     * @param delta delta.
-     * @param resAct conflict resolution action.
-     * @param dryRun dry run.
-     * @return list of synchronization results.
-     * @throws JobExecutionException in case of synchronization failure.
-     */
-    protected final List<SyncResult> handleDelta(final SyncTask syncTask, final SyncDelta delta,
-            final ConflictResolutionAction resAct, final boolean dryRun) throws JobExecutionException {
-
-        final List<SyncResult> results = new ArrayList<SyncResult>();
-
-        LOG.debug("Process '{}' for '{}'", delta.getDeltaType(), delta.getUid().getUidValue());
-
-        final List<Long> users = findExistingUsers(delta);
-
-        switch (delta.getDeltaType()) {
-            case CREATE_OR_UPDATE:
-                if (users.isEmpty()) {
-                    results.addAll(createUser(delta, dryRun));
-                } else if (users.size() == 1) {
-                    results.addAll(updateUsers(delta, users.subList(0, 1), dryRun));
-                } else {
-                    switch (resAct) {
-                        case IGNORE:
-                            LOG.error("More than one match {}", users);
-                            break;
-
-                        case FIRSTMATCH:
-                            results.addAll(updateUsers(delta, users.subList(0, 1), dryRun));
-                            break;
-
-                        case LASTMATCH:
-                            results.addAll(updateUsers(delta, users.subList(users.size() - 1, users.size()), dryRun));
-                            break;
-
-                        case ALL:
-                            results.addAll(updateUsers(delta, users, dryRun));
-                            break;
-
-                        default:
-                    }
-                }
-                break;
-
-            case DELETE:
-                if (users.isEmpty()) {
-                    LOG.debug("No match found for deletion");
-                } else if (users.size() == 1) {
-                    results.addAll(deleteUsers(delta, users, dryRun));
-                } else {
-                    switch (resAct) {
-                        case IGNORE:
-                            LOG.error("More than one match {}", users);
-                            break;
-
-                        case FIRSTMATCH:
-                            results.addAll(deleteUsers(delta, users.subList(0, 1), dryRun));
-                            break;
-
-                        case LASTMATCH:
-                            results.addAll(deleteUsers(delta, users.subList(users.size() - 1, users.size()), dryRun));
-                            break;
-
-                        case ALL:
-                            results.addAll(deleteUsers(delta, users, dryRun));
-                            break;
-
-                        default:
-                    }
-                }
-
-                break;
-
-            default:
-        }
-
-        return results;
-    }
-
     @Override
     protected boolean hasToBeRegistered(final TaskExec execution) {
         SyncTask syncTask = (SyncTask) task;
@@ -757,35 +297,4 @@ public class SyncJob extends AbstractTas
                 && syncTask.getResource().getSyncTraceLevel().ordinal() >= TraceLevel.FAILURES.ordinal())
                 || syncTask.getResource().getSyncTraceLevel() == TraceLevel.ALL;
     }
-
-    private class SyncJobResultsHandler implements SyncResultsHandler {
-
-        private final Collection<SyncResult> results;
-
-        private final SyncTask syncTask;
-
-        private final ConflictResolutionAction resAct;
-
-        private final boolean dryRun;
-
-        public SyncJobResultsHandler(final Collection<SyncResult> results, final SyncTask syncTask,
-                final ConflictResolutionAction resAct, final boolean dryRun) {
-
-            this.results = results;
-            this.syncTask = syncTask;
-            this.resAct = resAct;
-            this.dryRun = dryRun;
-        }
-
-        @Override
-        public boolean handle(final SyncDelta delta) {
-            try {
-                results.addAll(handleDelta(syncTask, delta, resAct, dryRun));
-                return true;
-            } catch (JobExecutionException e) {
-                LOG.error("Synchronization failed", e);
-                return false;
-            }
-        }
-    }
 }

Copied: incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/SyncResult.java (from r1400893, incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SyncResult.java)
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/SyncResult.java?p2=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/SyncResult.java&p1=incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SyncResult.java&r1=1400893&r2=1401182&rev=1401182&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/scheduling/SyncResult.java (original)
+++ incubator/syncope/trunk/core/src/main/java/org/apache/syncope/core/sync/SyncResult.java Tue Oct 23 07:49:23 2012
@@ -16,14 +16,14 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.syncope.core.scheduling;
+package org.apache.syncope.core.sync;
 
 import java.util.Collection;
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.builder.ReflectionToStringBuilder;
 import org.apache.commons.lang.builder.ToStringStyle;
-import org.apache.syncope.core.scheduling.AbstractTaskJob.Status;
+import org.apache.syncope.core.quartz.AbstractTaskJob.Status;
 import org.apache.syncope.types.TraceLevel;
 
 public class SyncResult {



Mime
View raw message