You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by sh...@apache.org on 2016/11/14 16:25:57 UTC

[35/38] incubator-unomi git commit: Merge PR #14

Merge PR #14


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

Branch: refs/heads/UNOMI-28-ES-2-X-UPGRADE
Commit: 7382af5ad2371f966959ea47f8ae77c2f206f0e6
Parents: 940ca9d 36bc5d2
Author: Thomas Draier <dr...@apache.org>
Authored: Thu Oct 27 09:55:32 2016 +0200
Committer: Thomas Draier <dr...@apache.org>
Committed: Thu Oct 27 09:55:32 2016 +0200

----------------------------------------------------------------------
 .../plugins/baseplugin/actions/SetPropertyAction.java    | 11 ++++++++---
 .../META-INF/cxs/actions/setPropertyAction.json          |  5 +++++
 2 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/7382af5a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/SetPropertyAction.java
----------------------------------------------------------------------
diff --cc plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/SetPropertyAction.java
index 54ce89c,25c4b0e..f50de42
--- 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,15 -41,17 +41,20 @@@ public class SetPropertyAction implemen
          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");
+         Object setPropertyValueMultiple = action.getParameterValues().get("setPropertyValueMultiple");
  
-         if(propertyValueInteger != null && propertyValue == null) {
-             propertyValue = PropertyHelper.getInteger(propertyValueInteger);
+         if (propertyValue == null) {
+             if (propertyValueInteger != null) {
+                 propertyValue = PropertyHelper.getInteger(propertyValueInteger);
+             }
+             if(setPropertyValueMultiple != null) {
+                propertyValue = setPropertyValueMultiple;
+             }
          }
- 
          if (propertyValue != null && propertyValue.equals("now")) {
              SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
              format.setTimeZone(TimeZone.getTimeZone("UTC"));