syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [11/43] syncope git commit: [SYNCOPE-893] Fixing by removing NotNull constraint on realm at JPA level, as it is already enforced at DataBinder level
Date Wed, 20 Jul 2016 14:58:05 GMT
[SYNCOPE-893] Fixing by removing NotNull constraint on realm at JPA level, as it is already
enforced at DataBinder level


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

Branch: refs/heads/2_0_NO_JAXB
Commit: a9bd3ce15ab684befa28024fd25c1f10e763ff4c
Parents: 8943d28
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Wed Jul 6 16:58:11 2016 +0200
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Wed Jul 6 16:58:11 2016 +0200

----------------------------------------------------------------------
 .../persistence/jpa/entity/AbstractAny.java     |   2 +-
 .../AbstractProvisioningJobDelegate.java        | 120 ++++++++++++-------
 .../java/DefaultAnyObjectWorkflowAdapter.java   |   2 -
 .../java/DefaultGroupWorkflowAdapter.java       |   2 -
 4 files changed, 81 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/a9bd3ce1/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractAny.java
----------------------------------------------------------------------
diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractAny.java
b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractAny.java
index bd5a108..449b0f3 100644
--- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractAny.java
+++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/AbstractAny.java
@@ -38,7 +38,7 @@ public abstract class AbstractAny<P extends PlainAttr<?>> extends
AbstractAnnota
 
     private static final long serialVersionUID = -2666540708092702810L;
 
-    @ManyToOne(fetch = FetchType.EAGER, optional = false)
+    @ManyToOne(fetch = FetchType.EAGER)
     private JPARealm realm;
 
     private String workflowId;

http://git-wip-us.apache.org/repos/asf/syncope/blob/a9bd3ce1/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractProvisioningJobDelegate.java
----------------------------------------------------------------------
diff --git a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractProvisioningJobDelegate.java
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractProvisioningJobDelegate.java
index ee69ee2..64d8776 100644
--- a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractProvisioningJobDelegate.java
+++ b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractProvisioningJobDelegate.java
@@ -427,52 +427,92 @@ public abstract class AbstractProvisioningJobDelegate<T extends ProvisioningTask
         // Succeeded, only if on 'ALL' level
         if (traceLevel == TraceLevel.ALL) {
             if (includeUser) {
-                report.append("\n\nUsers created:\n").
-                        append(ProvisioningReport.generate(uSuccCreate, traceLevel)).
-                        append("\nUsers updated:\n").
-                        append(ProvisioningReport.generate(uSuccUpdate, traceLevel)).
-                        append("\nUsers deleted:\n").
-                        append(ProvisioningReport.generate(uSuccDelete, traceLevel)).
-                        append("\nUsers no operation:\n").
-                        append(ProvisioningReport.generate(uSuccNone, traceLevel)).
-                        append("\nUsers ignored:\n").
-                        append(ProvisioningReport.generate(uIgnore, traceLevel));
+                if (!uSuccCreate.isEmpty()) {
+                    report.append("\n\nUsers created:\n").
+                            append(ProvisioningReport.generate(uSuccCreate, traceLevel));
+                }
+                if (!uSuccUpdate.isEmpty()) {
+                    report.append("\nUsers updated:\n").
+                            append(ProvisioningReport.generate(uSuccUpdate, traceLevel));
+                }
+                if (!uSuccDelete.isEmpty()) {
+                    report.append("\nUsers deleted:\n").
+                            append(ProvisioningReport.generate(uSuccDelete, traceLevel));
+                }
+                if (!uSuccNone.isEmpty()) {
+                    report.append("\nUsers no operation:\n").
+                            append(ProvisioningReport.generate(uSuccNone, traceLevel));
+                }
+                if (!uIgnore.isEmpty()) {
+                    report.append("\nUsers ignored:\n").
+                            append(ProvisioningReport.generate(uIgnore, traceLevel));
+                }
             }
             if (includeGroup) {
-                report.append("\n\nGroups created:\n").
-                        append(ProvisioningReport.generate(gSuccCreate, traceLevel)).
-                        append("\nGroups updated:\n").
-                        append(ProvisioningReport.generate(gSuccUpdate, traceLevel)).
-                        append("\nGroups deleted:\n").
-                        append(ProvisioningReport.generate(gSuccDelete, traceLevel)).
-                        append("\nGroups no operation:\n").
-                        append(ProvisioningReport.generate(gSuccNone, traceLevel)).
-                        append("\nGroups ignored:\n").
-                        append(ProvisioningReport.generate(gSuccNone, traceLevel));
+                if (!gSuccCreate.isEmpty()) {
+                    report.append("\n\nGroups created:\n").
+                            append(ProvisioningReport.generate(gSuccCreate, traceLevel));
+                }
+                if (!gSuccUpdate.isEmpty()) {
+                    report.append("\nGroups updated:\n").
+                            append(ProvisioningReport.generate(gSuccUpdate, traceLevel));
+                }
+                if (!gSuccDelete.isEmpty()) {
+                    report.append("\nGroups deleted:\n").
+                            append(ProvisioningReport.generate(gSuccDelete, traceLevel));
+                }
+                if (!gSuccNone.isEmpty()) {
+                    report.append("\nGroups no operation:\n").
+                            append(ProvisioningReport.generate(gSuccNone, traceLevel));
+                }
+                if (!gIgnore.isEmpty()) {
+                    report.append("\nGroups ignored:\n").
+                            append(ProvisioningReport.generate(gIgnore, traceLevel));
+                }
             }
             if (includeAnyObject) {
-                report.append("\n\nAny objects created:\n").
-                        append(ProvisioningReport.generate(aSuccCreate, traceLevel)).
-                        append("\nAny objects updated:\n").
-                        append(ProvisioningReport.generate(aSuccUpdate, traceLevel)).
-                        append("\nAny objects deleted:\n").
-                        append(ProvisioningReport.generate(aSuccDelete, traceLevel)).
-                        append("\nAny objects no operation:\n").
-                        append(ProvisioningReport.generate(aSuccNone, traceLevel)).
-                        append("\nAny objects ignored:\n").
-                        append(ProvisioningReport.generate(aSuccNone, traceLevel));
+                if (!aSuccCreate.isEmpty()) {
+                    report.append("\n\nAny objects created:\n").
+                            append(ProvisioningReport.generate(aSuccCreate, traceLevel));
+                }
+                if (!aSuccUpdate.isEmpty()) {
+                    report.append("\nAny objects updated:\n").
+                            append(ProvisioningReport.generate(aSuccUpdate, traceLevel));
+                }
+                if (!aSuccDelete.isEmpty()) {
+                    report.append("\nAny objects deleted:\n").
+                            append(ProvisioningReport.generate(aSuccDelete, traceLevel));
+                }
+                if (!aSuccNone.isEmpty()) {
+                    report.append("\nAny objects no operation:\n").
+                            append(ProvisioningReport.generate(aSuccNone, traceLevel));
+                }
+                if (!aIgnore.isEmpty()) {
+                    report.append("\nAny objects ignored:\n").
+                            append(ProvisioningReport.generate(aIgnore, traceLevel));
+                }
             }
             if (includeRealm) {
-                report.append("\n\nRealms created:\n").
-                        append(ProvisioningReport.generate(rSuccCreate, traceLevel)).
-                        append("\nRealms updated:\n").
-                        append(ProvisioningReport.generate(rSuccUpdate, traceLevel)).
-                        append("\nRealms deleted:\n").
-                        append(ProvisioningReport.generate(rSuccDelete, traceLevel)).
-                        append("\nRealms no operation:\n").
-                        append(ProvisioningReport.generate(rSuccNone, traceLevel)).
-                        append("\nRealms ignored:\n").
-                        append(ProvisioningReport.generate(rSuccNone, traceLevel));
+                if (!rSuccCreate.isEmpty()) {
+                    report.append("\n\nRealms created:\n").
+                            append(ProvisioningReport.generate(rSuccCreate, traceLevel));
+                }
+                if (!rSuccUpdate.isEmpty()) {
+                    report.append("\nRealms updated:\n").
+                            append(ProvisioningReport.generate(rSuccUpdate, traceLevel));
+                }
+                if (!rSuccDelete.isEmpty()) {
+                    report.append("\nRealms deleted:\n").
+                            append(ProvisioningReport.generate(rSuccDelete, traceLevel));
+                }
+                if (!rSuccNone.isEmpty()) {
+                    report.append("\nRealms no operation:\n").
+                            append(ProvisioningReport.generate(rSuccNone, traceLevel));
+                }
+                if (!rIgnore.isEmpty()) {
+                    report.append("\nRealms ignored:\n").
+                            append(ProvisioningReport.generate(rIgnore, traceLevel));
+                }
             }
         }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/a9bd3ce1/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultAnyObjectWorkflowAdapter.java
----------------------------------------------------------------------
diff --git a/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultAnyObjectWorkflowAdapter.java
b/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultAnyObjectWorkflowAdapter.java
index 6aae0ef..3994923 100644
--- a/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultAnyObjectWorkflowAdapter.java
+++ b/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultAnyObjectWorkflowAdapter.java
@@ -30,12 +30,10 @@ import org.apache.syncope.core.persistence.api.entity.anyobject.AnyObject;
 import org.apache.syncope.core.provisioning.api.WorkflowResult;
 import org.apache.syncope.core.workflow.api.WorkflowDefinitionFormat;
 import org.apache.syncope.core.workflow.api.WorkflowException;
-import org.springframework.transaction.annotation.Transactional;
 
 /**
  * Simple implementation basically not involving any workflow engine.
  */
-@Transactional(rollbackFor = { Throwable.class })
 public class DefaultAnyObjectWorkflowAdapter extends AbstractAnyObjectWorkflowAdapter {
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/a9bd3ce1/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultGroupWorkflowAdapter.java
----------------------------------------------------------------------
diff --git a/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultGroupWorkflowAdapter.java
b/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultGroupWorkflowAdapter.java
index c60844c..6b557d6 100644
--- a/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultGroupWorkflowAdapter.java
+++ b/core/workflow-java/src/main/java/org/apache/syncope/core/workflow/java/DefaultGroupWorkflowAdapter.java
@@ -30,12 +30,10 @@ import org.apache.syncope.core.persistence.api.entity.group.Group;
 import org.apache.syncope.core.provisioning.api.WorkflowResult;
 import org.apache.syncope.core.workflow.api.WorkflowDefinitionFormat;
 import org.apache.syncope.core.workflow.api.WorkflowException;
-import org.springframework.transaction.annotation.Transactional;
 
 /**
  * Simple implementation basically not involving any workflow engine.
  */
-@Transactional(rollbackFor = { Throwable.class })
 public class DefaultGroupWorkflowAdapter extends AbstractGroupWorkflowAdapter {
 
     @Override


Mime
View raw message