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:37 UTC
[15/38] incubator-unomi git commit: UNOMI-56 : Add
setPropertyValueMultiple in setPropertyAction.json
UNOMI-56 : Add setPropertyValueMultiple in setPropertyAction.json
Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/36bc5d27
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/36bc5d27
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/36bc5d27
Branch: refs/heads/UNOMI-28-ES-2-X-UPGRADE
Commit: 36bc5d272d8bfe101ea9ce96fc35a2b145d8d686
Parents: 3ed69fa
Author: Abdelkader Midani <am...@jahia.com>
Authored: Wed Sep 21 18:22:19 2016 +0200
Committer: Abdelkader Midani <am...@jahia.com>
Committed: Wed Sep 21 18:23:31 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/36bc5d27/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..25c4b0e 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
@@ -42,11 +42,16 @@ public class SetPropertyAction implements ActionExecutor {
Object propertyValue = action.getParameterValues().get("setPropertyValue");
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"));
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/36bc5d27/plugins/baseplugin/src/main/resources/META-INF/cxs/actions/setPropertyAction.json
----------------------------------------------------------------------
diff --git a/plugins/baseplugin/src/main/resources/META-INF/cxs/actions/setPropertyAction.json b/plugins/baseplugin/src/main/resources/META-INF/cxs/actions/setPropertyAction.json
index 630f5ac..ff72333 100644
--- a/plugins/baseplugin/src/main/resources/META-INF/cxs/actions/setPropertyAction.json
+++ b/plugins/baseplugin/src/main/resources/META-INF/cxs/actions/setPropertyAction.json
@@ -26,6 +26,11 @@
"multivalued": false
},
{
+ "id": "setPropertyValueMultiple",
+ "type": "string",
+ "multivalued": true
+ },
+ {
"id": "setPropertyStrategy",
"type": "string",
"multivalued": false