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 2017/11/15 20:21:03 UTC
incubator-unomi git commit: UNOMI-133 Add (GDPR) consents to visitor
profiles - New condition to match consent modification with consent type
identifier and grant type
Repository: incubator-unomi
Updated Branches:
refs/heads/master 5e9ead7f6 -> dc30b7d47
UNOMI-133 Add (GDPR) consents to visitor profiles
- New condition to match consent modification with consent type identifier and grant type
Signed-off-by: Serge Huber <sh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/dc30b7d4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/dc30b7d4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/dc30b7d4
Branch: refs/heads/master
Commit: dc30b7d47485700bbbe714ff07efd0372ff9bbd5
Parents: 5e9ead7
Author: Serge Huber <sh...@apache.org>
Authored: Wed Nov 15 21:20:52 2017 +0100
Committer: Serge Huber <sh...@apache.org>
Committed: Wed Nov 15 21:20:52 2017 +0100
----------------------------------------------------------------------
.../modifyAnyConsentEventCondition.json | 23 +++++++++++
.../conditions/modifyConsentEventCondition.json | 41 ++++++++++++++++++--
.../META-INF/cxs/rules/modifyAnyConsent.json | 23 +++++++++++
.../META-INF/cxs/rules/modifyConsents.json | 23 -----------
4 files changed, 84 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc30b7d4/plugins/baseplugin/src/main/resources/META-INF/cxs/conditions/modifyAnyConsentEventCondition.json
----------------------------------------------------------------------
diff --git a/plugins/baseplugin/src/main/resources/META-INF/cxs/conditions/modifyAnyConsentEventCondition.json b/plugins/baseplugin/src/main/resources/META-INF/cxs/conditions/modifyAnyConsentEventCondition.json
new file mode 100644
index 0000000..d1b7046
--- /dev/null
+++ b/plugins/baseplugin/src/main/resources/META-INF/cxs/conditions/modifyAnyConsentEventCondition.json
@@ -0,0 +1,23 @@
+{
+ "metadata": {
+ "id": "modifyAnyConsentEventCondition",
+ "name": "modifyAnyConsentEventCondition",
+ "description": "Used to match any consent modification",
+ "systemTags": [
+ "profileTags",
+ "event",
+ "condition",
+ "eventCondition"
+ ],
+ "readOnly": true
+ },
+ "parentCondition": {
+ "type": "eventTypeCondition",
+ "parameterValues": {
+ "eventTypeId": "modifyConsent"
+ }
+ },
+
+ "parameters": [
+ ]
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc30b7d4/plugins/baseplugin/src/main/resources/META-INF/cxs/conditions/modifyConsentEventCondition.json
----------------------------------------------------------------------
diff --git a/plugins/baseplugin/src/main/resources/META-INF/cxs/conditions/modifyConsentEventCondition.json b/plugins/baseplugin/src/main/resources/META-INF/cxs/conditions/modifyConsentEventCondition.json
index b24c479..e808aa8 100644
--- a/plugins/baseplugin/src/main/resources/META-INF/cxs/conditions/modifyConsentEventCondition.json
+++ b/plugins/baseplugin/src/main/resources/META-INF/cxs/conditions/modifyConsentEventCondition.json
@@ -2,7 +2,7 @@
"metadata": {
"id": "modifyConsentEventCondition",
"name": "modifyConsentEventCondition",
- "description": "",
+ "description": "Used to match grant modifications on a specific consent",
"systemTags": [
"profileTags",
"event",
@@ -12,12 +12,47 @@
"readOnly": true
},
"parentCondition": {
- "type": "eventTypeCondition",
+ "type": "booleanCondition",
"parameterValues": {
- "eventTypeId": "modifyConsent"
+ "operator": "and",
+ "subConditions": [
+ {
+ "type": "eventTypeCondition",
+ "parameterValues": {
+ "eventTypeId": "modifyConsent"
+ }
+ },
+ {
+ "type": "eventPropertyCondition",
+ "parameterValues": {
+ "propertyName": "properties.consent.typeIdentifier",
+ "comparisonOperator": "equals",
+ "propertyValue": "parameter::consentTypeId"
+ }
+ },
+ {
+ "type": "eventPropertyCondition",
+ "parameterValues": {
+ "propertyName": "properties.consent.grant",
+ "comparisonOperator": "equals",
+ "propertyValue": "parameter::consentGrant"
+ }
+ }
+ ]
}
+
},
"parameters": [
+ {
+ "id": "consentTypeId",
+ "type": "String",
+ "multivalued": false
+ },
+ {
+ "id": "consentGrant",
+ "type": "String",
+ "multivalued": false
+ }
]
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc30b7d4/plugins/baseplugin/src/main/resources/META-INF/cxs/rules/modifyAnyConsent.json
----------------------------------------------------------------------
diff --git a/plugins/baseplugin/src/main/resources/META-INF/cxs/rules/modifyAnyConsent.json b/plugins/baseplugin/src/main/resources/META-INF/cxs/rules/modifyAnyConsent.json
new file mode 100644
index 0000000..dbb092f
--- /dev/null
+++ b/plugins/baseplugin/src/main/resources/META-INF/cxs/rules/modifyAnyConsent.json
@@ -0,0 +1,23 @@
+{
+ "metadata" : {
+ "id": "modifyAnyConsent",
+ "name": "Modify any consent",
+ "description" : "Modify any consent and sets the consent in the profile",
+ "readOnly":true
+ },
+
+ "condition" : {
+ "type": "modifyAnyConsentEventCondition",
+ "parameterValues": {
+ }
+ },
+
+ "actions" : [
+ {
+ "type": "modifyConsentAction",
+ "parameterValues": {
+ }
+ }
+ ]
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dc30b7d4/plugins/baseplugin/src/main/resources/META-INF/cxs/rules/modifyConsents.json
----------------------------------------------------------------------
diff --git a/plugins/baseplugin/src/main/resources/META-INF/cxs/rules/modifyConsents.json b/plugins/baseplugin/src/main/resources/META-INF/cxs/rules/modifyConsents.json
deleted file mode 100644
index 34531a7..0000000
--- a/plugins/baseplugin/src/main/resources/META-INF/cxs/rules/modifyConsents.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "metadata" : {
- "id": "modifyConsent",
- "name": "Modify consent",
- "description" : "Modify a consent",
- "readOnly":true
- },
-
- "condition" : {
- "type": "modifyConsentEventCondition",
- "parameterValues": {
- }
- },
-
- "actions" : [
- {
- "type": "modifyConsentAction",
- "parameterValues": {
- }
- }
- ]
-
-}
\ No newline at end of file