Repository: syncope
Updated Branches:
  refs/heads/1_2_X d5f34103a -> b97eb56e4


[SYNCOPE-663] Option to ignore users/roles during synchronization or push


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

Branch: refs/heads/1_2_X
Commit: dda37dcbeb7524a8dc2b5fc9e9f0fbb711f11116
Parents: 28275f8
Author: Marco Di Sabatino Di Diodoro <[email protected]>
Authored: Thu Apr 30 17:36:16 2015 +0200
Committer: Marco Di Sabatino Di Diodoro <[email protected]>
Committed: Thu Apr 30 17:36:16 2015 +0200

----------------------------------------------------------------------
 .../core/sync/impl/AbstractSubjectPushResultHandler.java |  3 +++
 .../core/sync/impl/AbstractSubjectSyncResultHandler.java | 11 +++++++++++
 2 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/dda37dcb/core/src/main/java/org/apache/syncope/core/sync/impl/AbstractSubjectPushResultHandler.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/syncope/core/sync/impl/AbstractSubjectPushResultHandler.java
 
b/core/src/main/java/org/apache/syncope/core/sync/impl/AbstractSubjectPushResultHandler.java
index e360f43..ff7c2bb 100644
--- 
a/core/src/main/java/org/apache/syncope/core/sync/impl/AbstractSubjectPushResultHandler.java
+++ 
b/core/src/main/java/org/apache/syncope/core/sync/impl/AbstractSubjectPushResultHandler.java
@@ -81,6 +81,7 @@ public abstract class AbstractSubjectPushResultHandler 
extends AbstractSyncopeRe
             result.setSubjectType(getAttributableUtil().getType());
             result.setStatus(SyncResult.Status.IGNORE);
             result.setId(subjectId);
+            profile.getResults().add(result);
 
             LOG.warn("Ignoring during synchronization", e);
             return true;
@@ -264,6 +265,8 @@ public abstract class AbstractSubjectPushResultHandler 
extends AbstractSyncopeRe
                 result.setStatus(SyncResult.Status.SUCCESS);
                 resultStatus = AuditElements.Result.SUCCESS;
                 output = getRemoteObject(accountId);
+            } catch (IgnoreProvisionException e) {
+                throw e;
             } catch (Exception e) {
                 result.setStatus(SyncResult.Status.FAILURE);
                 result.setMessage(ExceptionUtils.getRootCauseMessage(e));

http://git-wip-us.apache.org/repos/asf/syncope/blob/dda37dcb/core/src/main/java/org/apache/syncope/core/sync/impl/AbstractSubjectSyncResultHandler.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/syncope/core/sync/impl/AbstractSubjectSyncResultHandler.java
 
b/core/src/main/java/org/apache/syncope/core/sync/impl/AbstractSubjectSyncResultHandler.java
index 6b6c647..cceee7c 100644
--- 
a/core/src/main/java/org/apache/syncope/core/sync/impl/AbstractSubjectSyncResultHandler.java
+++ 
b/core/src/main/java/org/apache/syncope/core/sync/impl/AbstractSubjectSyncResultHandler.java
@@ -93,6 +93,7 @@ public abstract class AbstractSubjectSyncResultHandler 
extends AbstractSyncopeRe
             result.setStatus(SyncResult.Status.IGNORE);
             result.setId(0L);
             result.setName(delta.getObject().getName().getNameValue());
+            profile.getResults().add(result);
 
             LOG.warn("Ignoring during synchronization", e);
             return true;
@@ -202,6 +203,8 @@ public abstract class AbstractSubjectSyncResultHandler 
extends AbstractSyncopeRe
             LOG.error("Could not propagate {} {}", attrUtil.getType(), 
delta.getUid().getUidValue(), e);
             output = e;
             resultStatus = Result.FAILURE;
+        } catch (IgnoreProvisionException e) {
+            throw e;
         } catch (Exception e) {
             result.setStatus(SyncResult.Status.FAILURE);
             result.setMessage(ExceptionUtils.getRootCauseMessage(e));
@@ -279,6 +282,8 @@ public abstract class AbstractSubjectSyncResultHandler 
extends AbstractSyncopeRe
                         LOG.error("Could not propagate {} {}", 
attrUtil.getType(), delta.getUid().getUidValue(), e);
                         output = e;
                         resultStatus = Result.FAILURE;
+                    } catch (IgnoreProvisionException e) {
+                        throw e;
                     } catch (Exception e) {
                         result.setStatus(SyncResult.Status.FAILURE);
                         
result.setMessage(ExceptionUtils.getRootCauseMessage(e));
@@ -362,6 +367,8 @@ public abstract class AbstractSubjectSyncResultHandler 
extends AbstractSyncopeRe
                         LOG.error("Could not propagate {} {}", 
attrUtil.getType(), delta.getUid().getUidValue(), e);
                         output = e;
                         resultStatus = Result.FAILURE;
+                    } catch (IgnoreProvisionException e) {
+                        throw e;
                     } catch (Exception e) {
                         result.setStatus(SyncResult.Status.FAILURE);
                         
result.setMessage(ExceptionUtils.getRootCauseMessage(e));
@@ -447,6 +454,8 @@ public abstract class AbstractSubjectSyncResultHandler 
extends AbstractSyncopeRe
                         LOG.error("Could not propagate {} {}", 
attrUtil.getType(), delta.getUid().getUidValue(), e);
                         output = e;
                         resultStatus = Result.FAILURE;
+                    } catch (IgnoreProvisionException e) {
+                        throw e;
                     } catch (Exception e) {
                         result.setStatus(SyncResult.Status.FAILURE);
                         
result.setMessage(ExceptionUtils.getRootCauseMessage(e));
@@ -501,6 +510,8 @@ public abstract class AbstractSubjectSyncResultHandler 
extends AbstractSyncopeRe
                         doDelete(id);
                         output = null;
                         resultStatus = Result.SUCCESS;
+                    } catch (IgnoreProvisionException e) {
+                        throw e;
                     } catch (Exception e) {
                         result.setStatus(SyncResult.Status.FAILURE);
                         
result.setMessage(ExceptionUtils.getRootCauseMessage(e));

Reply via email to