syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdisabat...@apache.org
Subject svn commit: r1503757 - in /syncope/trunk: ./ common/src/main/java/org/apache/syncope/common/to/ core/src/main/java/org/apache/syncope/core/propagation/ core/src/main/java/org/apache/syncope/core/propagation/impl/ core/src/test/java/org/apache/syncope/c...
Date Tue, 16 Jul 2013 15:24:33 GMT
Author: mdisabatino
Date: Tue Jul 16 15:24:32 2013
New Revision: 1503757

URL: http://svn.apache.org/r1503757
Log:
Merge from 1_1_X

Modified:
    syncope/trunk/   (props changed)
    syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationStatusTO.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/PropagationHandler.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/AbstractPropagationTaskExecutor.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/DefaultPropagationHandler.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java

Propchange: syncope/trunk/
------------------------------------------------------------------------------
  Merged /syncope/branches/1_1_X:r1503174-1503754

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationStatusTO.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationStatusTO.java?rev=1503757&r1=1503756&r2=1503757&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationStatusTO.java
(original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/to/PropagationStatusTO.java
Tue Jul 16 15:24:32 2013
@@ -55,6 +55,11 @@ public class PropagationStatusTO extends
      * Propagation task execution status.
      */
     private PropagationTaskExecStatus status;
+    
+    /**
+     * Propagation task execution message.
+     */
+    private String executionMessage;
 
     /**
      * After object getter.
@@ -127,4 +132,22 @@ public class PropagationStatusTO extends
     public void setStatus(final PropagationTaskExecStatus status) {
         this.status = status;
     }
+    
+    /**
+     * Propagation execution message getter.
+     *
+     * @return executionMessage.
+     */
+    public String getExecutionMessage() {
+        return executionMessage;
+    }
+
+    /**
+     * Propagation execution message setter.
+     *
+     * @param executionMessage
+     */
+    public void setExecutionMessage(final String executionMessage) {
+        this.executionMessage = executionMessage;
+    }
 }

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/PropagationHandler.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/PropagationHandler.java?rev=1503757&r1=1503756&r2=1503757&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/PropagationHandler.java
(original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/PropagationHandler.java
Tue Jul 16 15:24:32 2013
@@ -36,5 +36,5 @@ public interface PropagationHandler {
      * @param afterObj retrieved connector object after operation execution.
      */
     void handle(String resourceName, PropagationTaskExecStatus execStatus,
-            ConnectorObject beforeObj, ConnectorObject afterObj);
+            String taskExecutionMessage, ConnectorObject beforeObj, ConnectorObject afterObj);
 }

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/AbstractPropagationTaskExecutor.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/AbstractPropagationTaskExecutor.java?rev=1503757&r1=1503756&r2=1503757&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/AbstractPropagationTaskExecutor.java
(original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/AbstractPropagationTaskExecutor.java
Tue Jul 16 15:24:32 2013
@@ -362,14 +362,15 @@ public abstract class AbstractPropagatio
                 // this flush call is needed to generate a value for the execution id
                 taskDAO.flush();
             }
-        }
-
-        if (handler != null) {
-            handler.handle(
-                    task.getResource().getName(),
-                    PropagationTaskExecStatus.valueOf(execution.getStatus()),
-                    beforeObj,
-                    afterObj);
+            
+            if (handler != null) {
+                handler.handle(
+                        task.getResource().getName(),
+                        PropagationTaskExecStatus.valueOf(execution.getStatus()),
+                        taskExecutionMessage,
+                        beforeObj,
+                        afterObj);
+            }
         }
 
         actions.after(task, execution, afterObj);

Modified: syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/DefaultPropagationHandler.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/DefaultPropagationHandler.java?rev=1503757&r1=1503756&r2=1503757&view=diff
==============================================================================
--- syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/DefaultPropagationHandler.java
(original)
+++ syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/DefaultPropagationHandler.java
Tue Jul 16 15:24:32 2013
@@ -40,11 +40,12 @@ public class DefaultPropagationHandler i
 
     @Override
     public void handle(final String resource, final PropagationTaskExecStatus executionStatus,
-            final ConnectorObject beforeObj, final ConnectorObject afterObj) {
+            final String taskExecutionMessage, final ConnectorObject beforeObj, final ConnectorObject
afterObj) {
 
         final PropagationStatusTO propagation = new PropagationStatusTO();
         propagation.setResource(resource);
         propagation.setStatus(executionStatus);
+        propagation.setExecutionMessage(taskExecutionMessage);
 
         if (beforeObj != null) {
             propagation.setBeforeObj(connObjectUtil.getConnObjectTO(beforeObj));

Modified: syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java
URL: http://svn.apache.org/viewvc/syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java?rev=1503757&r1=1503756&r2=1503757&view=diff
==============================================================================
--- syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java (original)
+++ syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java Tue
Jul 16 15:24:32 2013
@@ -2219,6 +2219,7 @@ public class UserTestITCase extends Abst
         userTO = userService.update(userMod.getId(), userMod);
         assertEquals(RESOURCE_NAME_TESTDB, userTO.getResources().iterator().next());
         assertFalse(userTO.getPropagationStatusTOs().get(0).getStatus().isSuccessful());
+        assertNotNull(userTO.getPropagationStatusTOs().get(0).getExecutionMessage());
 
         // 3. request to change password only on testdb
         userMod = new UserMod();



Mime
View raw message