You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by dr...@apache.org on 2016/10/27 07:46:31 UTC

[1/3] incubator-unomi git commit: UNOMI-59 : Handle update of multivalued property - form mapping

Repository: incubator-unomi
Updated Branches:
  refs/heads/master d8c63f58f -> 0f87d095a


UNOMI-59 : Handle update of multivalued property - form mapping


Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/0f87d095
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/0f87d095
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/0f87d095

Branch: refs/heads/master
Commit: 0f87d095a4cc444a64d374cc4249ae2105a8ac36
Parents: a0a87f3
Author: Abdelkader Midani <am...@jahia.com>
Authored: Wed Oct 19 16:35:28 2016 +0200
Committer: Thomas Draier <dr...@apache.org>
Committed: Thu Oct 27 09:45:46 2016 +0200

----------------------------------------------------------------------
 .../unomi/plugins/baseplugin/actions/SetPropertyAction.java       | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/0f87d095/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/SetPropertyAction.java
----------------------------------------------------------------------
diff --git a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/SetPropertyAction.java b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/SetPropertyAction.java
index a731468..54ce89c 100644
--- a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/SetPropertyAction.java
+++ b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/SetPropertyAction.java
@@ -41,6 +41,9 @@ public class SetPropertyAction implements ActionExecutor {
         String propertyName = (String) action.getParameterValues().get("setPropertyName");
 
         Object propertyValue = action.getParameterValues().get("setPropertyValue");
+        if(propertyValue == null) {
+            propertyValue = action.getParameterValues().get("setPropertyValueMultiple");
+        }
         Object propertyValueInteger = action.getParameterValues().get("setPropertyValueInteger");
 
         if(propertyValueInteger != null && propertyValue == null) {


[3/3] incubator-unomi git commit: UNOMI-59 : Handle update of multivalued property

Posted by dr...@apache.org.
UNOMI-59 : Handle update of multivalued property


Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/4c20fa6b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/4c20fa6b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/4c20fa6b

Branch: refs/heads/master
Commit: 4c20fa6b90da96d02b85f3b030401920983fe266
Parents: d8c63f5
Author: Abdelkader Midani <am...@jahia.com>
Authored: Fri Sep 30 18:15:43 2016 +0200
Committer: Thomas Draier <dr...@apache.org>
Committed: Thu Oct 27 09:45:46 2016 +0200

----------------------------------------------------------------------
 .../java/org/apache/unomi/services/services/ProfileServiceImpl.java | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/4c20fa6b/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java
index 71fe2fd..9194d16 100644
--- a/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java
@@ -774,6 +774,7 @@ public class ProfileServiceImpl implements ProfileService, SynchronousBundleList
                     Collection currentCollection = (Collection) target.get(newEntry.getKey());
                     if (currentCollection != null) {
                         if (!currentCollection.containsAll((Collection) newEntry.getValue())) {
+                            currentCollection.clear();
                             changed |= currentCollection.addAll((Collection) newEntry.getValue());
                         }
                     } else {


[2/3] incubator-unomi git commit: UNOMI-59 : Handle update of multivalued property

Posted by dr...@apache.org.
UNOMI-59 : Handle update of multivalued property


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

Branch: refs/heads/master
Commit: a0a87f30ee765d9914d1b8b7e523880cc6a66f40
Parents: 4c20fa6
Author: Abdelkader Midani <am...@jahia.com>
Authored: Tue Oct 11 18:27:34 2016 +0200
Committer: Thomas Draier <dr...@apache.org>
Committed: Thu Oct 27 09:45:46 2016 +0200

----------------------------------------------------------------------
 .../unomi/services/services/ProfileServiceImpl.java     | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/a0a87f30/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java
index 9194d16..52aef50 100644
--- a/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java
@@ -771,16 +771,8 @@ public class ProfileServiceImpl implements ProfileService, SynchronousBundleList
         for (Map.Entry<String, Object> newEntry : object.entrySet()) {
             if (newEntry.getValue() != null) {
                 if (newEntry.getValue() instanceof Collection) {
-                    Collection currentCollection = (Collection) target.get(newEntry.getKey());
-                    if (currentCollection != null) {
-                        if (!currentCollection.containsAll((Collection) newEntry.getValue())) {
-                            currentCollection.clear();
-                            changed |= currentCollection.addAll((Collection) newEntry.getValue());
-                        }
-                    } else {
-                        target.put(newEntry.getKey(), newEntry.getValue());
-                        changed = true;
-                    }
+                    target.put(newEntry.getKey(), newEntry.getValue());
+                    changed = true;
                 } else if (newEntry.getValue() instanceof Map) {
                     Map<String,Object> currentMap = (Map) target.get(newEntry.getKey());
                     if (currentMap == null) {