incubator-unomi git commit: UNOMI-209: set dependency on itests for package only when integration-tests profile is used cleanup hardcoded self dependency version on project version by using maven ${pr
Repository: incubator-unomi Updated Branches: refs/heads/master a1eeab383 -> 23b556fe1 UNOMI-209: set dependency on itests for package only when integration-tests profile is used cleanup hardcoded self dependency version on project version by using maven ${project.version} Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/23b556fe Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/23b556fe Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/23b556fe Branch: refs/heads/master Commit: 23b556fe13a9a86a4189d87713f25efca8e88045 Parents: a1eeab3 Author: Kevan Authored: Tue Nov 13 11:38:41 2018 +0100 Committer: Kevan Committed: Tue Nov 13 11:38:41 2018 +0100 -- buildAndRunNoTests.sh | 2 +- extensions/geonames/rest/pom.xml| 6 ++-- extensions/geonames/services/pom.xml| 5 ++- extensions/lists-extension/actions/pom.xml | 5 ++- extensions/lists-extension/pom.xml | 1 - extensions/lists-extension/rest/pom.xml | 6 ++-- extensions/lists-extension/services/pom.xml | 6 ++-- extensions/privacy-extension/pom.xml| 2 +- extensions/privacy-extension/rest/pom.xml | 6 ++-- extensions/privacy-extension/services/pom.xml | 4 +-- extensions/salesforce-connector/actions/pom.xml | 4 +-- .../salesforce-connector/karaf-kar/pom.xml | 8 ++--- extensions/salesforce-connector/rest/pom.xml| 6 ++-- .../salesforce-connector/services/pom.xml | 4 +-- extensions/weather-update/karaf-kar/pom.xml | 2 +- extensions/web-tracker/karaf-kar/pom.xml| 2 +- kar/pom.xml | 38 ++-- metrics/pom.xml | 4 +-- package/pom.xml | 26 -- persistence-elasticsearch/core/pom.xml | 6 ++-- persistence-spi/pom.xml | 2 +- plugins/baseplugin/pom.xml | 4 +-- plugins/hover-event/pom.xml | 2 +- plugins/mail/pom.xml| 2 +- plugins/past-event/pom.xml | 4 +-- plugins/pom.xml | 2 +- plugins/tracked-event/pom.xml | 4 +-- rest/pom.xml| 4 +-- samples/login-integration/pom.xml | 2 +- samples/tweet-button-plugin/pom.xml | 2 +- services/pom.xml| 6 ++-- tools/shell-dev-commands/pom.xml| 6 ++-- wab/pom.xml | 4 +-- 33 files changed, 93 insertions(+), 94 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/23b556fe/buildAndRunNoTests.sh -- diff --git a/buildAndRunNoTests.sh b/buildAndRunNoTests.sh index c948d4d..9ec4e3e 100755 --- a/buildAndRunNoTests.sh +++ b/buildAndRunNoTests.sh @@ -23,7 +23,7 @@ PROGNAME=`basename "$0"` if [ -f "$DIRNAME/setenv.sh" ]; then . "$DIRNAME/setenv.sh" fi -mvn clean install -P \!integration-tests,\!performance-tests,rat +mvn clean install -P \!integration-tests,\!performance-tests,rat -DskipTests if [ $? -ne 0 ] then exit 1; http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/23b556fe/extensions/geonames/rest/pom.xml -- diff --git a/extensions/geonames/rest/pom.xml b/extensions/geonames/rest/pom.xml index b6791ab..21871a5 100644 --- a/extensions/geonames/rest/pom.xml +++ b/extensions/geonames/rest/pom.xml @@ -33,14 +33,14 @@ org.apache.unomi unomi-api -1.4.0-incubating-SNAPSHOT +${project.version} provided org.apache.unomi cxs-geonames-services -1.4.0-incubating-SNAPSHOT +${project.version} provided @@ -76,7 +76,7 @@ org.apache.unomi unomi-persistence-spi -1.4.0-incubating-SNAPSHOT +${project.version} provided http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/23b556fe/extensions/geonames/services/pom.xml -- diff --git a/extensions/geonames/services/pom.xml b/extensions/geonames/services/pom.xml index d795e9a..cb8beb7 100644 --- a/extensions/geonames/services/pom.xml +++ b/extensions/geonames/services/pom.xml @@ -28,20 +28,19 @@ cxs-geonames-services Apache Unomi :: Extensions :: Geonames Database :: Service Service implementation for the Apache Uno
incubator-unomi git commit: UNOMI-208 add missing link to mailchimp documentation and fix salesforce link
Repository: incubator-unomi Updated Branches: refs/heads/master 781cab948 -> a1eeab383 UNOMI-208 add missing link to mailchimp documentation and fix salesforce link Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/a1eeab38 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/a1eeab38 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/a1eeab38 Branch: refs/heads/master Commit: a1eeab38359fa9e0395fa151d7c293c485732c21 Parents: 781cab9 Author: dgaillard Authored: Mon Nov 5 19:04:25 2018 +0100 Committer: dgaillard Committed: Mon Nov 5 19:04:25 2018 +0100 -- manual/src/main/asciidoc/connectors/connectors.adoc | 6 -- manual/src/main/asciidoc/index.adoc | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/a1eeab38/manual/src/main/asciidoc/connectors/connectors.adoc -- diff --git a/manual/src/main/asciidoc/connectors/connectors.adoc b/manual/src/main/asciidoc/connectors/connectors.adoc index ee3551b..a701a09 100644 --- a/manual/src/main/asciidoc/connectors/connectors.adoc +++ b/manual/src/main/asciidoc/connectors/connectors.adoc @@ -15,8 +15,10 @@ Apache Unomi provides the following connectors: -* link:salesforce-connectors.html[Salesforce CRM connectors] +* link:connectors/salesforce-connectors.html[Salesforce CRM connectors] + +* link:connectors/mailchimp-connectors.html[MailChimp connectors] Call for contributors -We are looking for help with the development of additional connectors. Any contribution (large or small) is more than welcome. Feel free to discuss this in our link:../../mail-lists.html[mailing list]. \ No newline at end of file +We are looking for help with the development of additional connectors. Any contribution (large or small) is more than welcome. Feel free to discuss this in our link:http://unomi.apache.org/community.html[mailing list, window="_blank"]. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/a1eeab38/manual/src/main/asciidoc/index.adoc -- diff --git a/manual/src/main/asciidoc/index.adoc b/manual/src/main/asciidoc/index.adoc index ea1d4a1..7589570 100644 --- a/manual/src/main/asciidoc/index.adoc +++ b/manual/src/main/asciidoc/index.adoc @@ -56,6 +56,8 @@ include::connectors/connectors.adoc[] include::connectors/salesforce-connector.adoc[] +include::connectors/mailchimp-connector.adoc[] + == Cluster setup include::clustering.adoc[]
incubator-unomi git commit: UNOMI-208 convert mailchimp connector documentation to adoc
Repository: incubator-unomi Updated Branches: refs/heads/master 67657bdb1 -> 781cab948 UNOMI-208 convert mailchimp connector documentation to adoc Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/781cab94 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/781cab94 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/781cab94 Branch: refs/heads/master Commit: 781cab94867e7d60047914c810259630fc1c85c7 Parents: 67657bd Author: dgaillard Authored: Mon Nov 5 18:30:22 2018 +0100 Committer: dgaillard Committed: Mon Nov 5 18:30:38 2018 +0100 -- extensions/unomi-mailchimp/README.md| 103 --- .../connectors/mailchimp-connector.adoc | 100 ++ 2 files changed, 100 insertions(+), 103 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/781cab94/extensions/unomi-mailchimp/README.md -- diff --git a/extensions/unomi-mailchimp/README.md b/extensions/unomi-mailchimp/README.md deleted file mode 100644 index 0d6f525..000 --- a/extensions/unomi-mailchimp/README.md +++ /dev/null @@ -1,103 +0,0 @@ - - - -Apache Unomi :: Extensions :: MailChimp Connector -= - -This extension has 3 actions. -Add a visitor into a defined Mailchimp list. -Remove a visitor from a defined Mailchimp list. -Unsubscribe a visitor from a defined Mailchimp list. - -## Getting started - -1. Create a new MailChimp account: - -https://login.mailchimp.com/signup/ - -2. Generate a new API Key, or get the default - -https://usX.admin.mailchimp.com/account/api/ - -3. Configure the MailChimp Connector Basic -In the etc/org.apache.unomi.mailchimpconnector.cfg file change the following settings: -``` -mailChimpConnector.apiKey=YOUR_APIKEY -mailChimpConnector.url.subDomain=YOUR_SUB_DOMAIN (exemple: https://usX.admin.mailchimp.com/account/api/, the X is the SUB_DOMAIN) -``` - - -4. Before starting configure the mapping between Apache Unomi profile properties and MailChimp member properties. -The mapping can't be use with multitued properties. You need to setup your MailChimp properties first in the MailChimp administration. - -``` -Go to: lists/ -Select the triggered list -Settings -``` - -Then in the cfg file -``` -mailChimpConnector.list.merge-fields.activate={Boolean} if you like to activate the mapping feature. -``` -This is the property to configure for the mapping, the format is as shown. -``` -mailChimpConnector.list.merge-fields.mapping={Apache Unomi property ID}<=>{MailChimp Tag name} -``` -NOTE: there is a particular format for the address -``` -{Apache Unomi property ID}<=>{MailChimp Tag name}<=>{MailChimp tag sub entry} -``` - -MailChimp type supported are: -* Date - ``` -The format is (DD/MM/) or (MM/DD/) -``` -* Birthday - ``` -The format is (DD/MM) or (MM/DD) - ``` -* Website or Text - ``` -They are text - ``` -* Number - ``` -The number will be parse into a Integer - ``` -* Phone - ``` -The North American format is not supported, use international - ``` -* Address - -NOTE : Street, City, Country and Zip are mandatory properties, otherwise the address property will be skipped - -Example: -``` -address<=>ADDRESS<=>addr1, -city<=>ADDRESS<=>city, -zipCode<=>ADDRESS<=>zip, -countryName<=>ADDRESS<=>country -``` - -5. Deploy into Apache Unomi using the following commands from the Apache Karaf shell: - -feature:repo-add mvn:org.apache.unomi/unomi-mailchimp-connector-karaf-kar/${project.version}/xml/features -feature:install unomi-mailchimp-connector-karaf-kar http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/781cab94/manual/src/main/asciidoc/connectors/mailchimp-connector.adoc -- diff --git a/manual/src/main/asciidoc/connectors/mailchimp-connector.adoc b/manual/src/main/asciidoc/connectors/mailchimp-connector.adoc new file mode 100644 index 000..e66b828 --- /dev/null +++ b/manual/src/main/asciidoc/connectors/mailchimp-connector.adoc @@ -0,0 +1,100 @@ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License a
incubator-unomi git commit: UNOMI-187 improve readme
Repository: incubator-unomi Updated Branches: refs/heads/master 50858d361 -> 5e4cd3730 UNOMI-187 improve readme Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/5e4cd373 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/5e4cd373 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/5e4cd373 Branch: refs/heads/master Commit: 5e4cd3730c58f880c8ab6efebcebad1ef1474f88 Parents: 50858d3 Author: dgaillard Authored: Fri Nov 2 15:49:01 2018 +0100 Committer: dgaillard Committed: Fri Nov 2 15:49:01 2018 +0100 -- extensions/web-tracker/README.md | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/5e4cd373/extensions/web-tracker/README.md -- diff --git a/extensions/web-tracker/README.md b/extensions/web-tracker/README.md index 6e23de1..9a05287 100644 --- a/extensions/web-tracker/README.md +++ b/extensions/web-tracker/README.md @@ -40,4 +40,9 @@ In your page include unomiOptions and include code snippet from `snippet.min.js` `window.unomiTracker` can be used to send additional events when needed. -Check analytics.js API [here](https://segment.com/docs/sources/website/analytics.js/). All methods can be used on `unomiTracker` object, although not all event types are supported by Unomi intergation. \ No newline at end of file +Check analytics.js API [here](https://segment.com/docs/sources/website/analytics.js/). All methods can be used on `unomiTracker` object, although not all event types are supported by Unomi intergation. + +## How to contribute + +The source code is in the folder javascript with a package.json, the file to update is `analytics.js-integration-apache-unomi.js` apply your modification in this file then use the command `yarn build` to compile a new JS file. +Then you can use the test page to try your changes `http://localhost:8181/tracker/index.html`.
incubator-unomi git commit: UNOMI-207 fix properties mapping issue when merging mappings from different index
Repository: incubator-unomi Updated Branches: refs/heads/master 19532afd8 -> 50858d361 UNOMI-207 fix properties mapping issue when merging mappings from different index Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/50858d36 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/50858d36 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/50858d36 Branch: refs/heads/master Commit: 50858d361bd83b8762eef86c2f0e3c0275d463f7 Parents: 19532af Author: dgaillard Authored: Wed Oct 31 18:23:00 2018 +0100 Committer: dgaillard Committed: Wed Oct 31 18:23:00 2018 +0100 -- .../ElasticSearchPersistenceServiceImpl.java| 55 ++-- 1 file changed, 39 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/50858d36/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java -- diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java index dd8c48f..1ab84ff 100644 --- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java +++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java @@ -1101,37 +1101,60 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService, return new InClassLoaderExecute>>(metricsService, this.getClass().getName() + ".getPropertiesMapping") { @SuppressWarnings("unchecked") protected Map> execute(Object... args) throws Exception { +// Get all mapping for current itemType GetMappingsResponse getMappingsResponse = client.admin().indices().prepareGetMappings().setTypes(itemType).execute().actionGet(); ImmutableOpenMap> mappings = getMappingsResponse.getMappings(); -Map> propertyMap = new HashMap<>(); + +// create a list of Keys to get the mappings in chronological order +// in case there is monthly context then the mapping will be added from the oldest to the most recent one +Set orderedKeys = new TreeSet<>(Arrays.asList(mappings.keys().toArray(String.class))); + +Map> result = new HashMap<>(); try { -Iterator> it = mappings.valuesIt(); -while (it.hasNext()) { -ImmutableOpenMap next = it.next(); -Map> properties = (Map>) next.get(itemType).getSourceAsMap().get("properties"); -for (Map.Entry> entry : properties.entrySet()) { -if (propertyMap.containsKey(entry.getKey())) { -Map subPropMap = propertyMap.get(entry.getKey()); -for (Map.Entry subentry : entry.getValue().entrySet()) { -if (subPropMap.containsKey(subentry.getKey()) && subPropMap.get(subentry.getKey()) instanceof Map && subentry.getValue() instanceof Map) { -((Map) subPropMap.get(subentry.getKey())).putAll((Map) subentry.getValue()); -} else { -subPropMap.put(subentry.getKey(), subentry.getValue()); +for (String key : orderedKeys) { +if (mappings.containsKey(key)) { +ImmutableOpenMap next = mappings.get(key); + +Map> properties = (Map>) next.get(itemType).getSourceAsMap().get("properties"); +for (Map.Entry> entry : properties.entrySet()) { +if (result.containsKey(entry.getKey())) { +Map subResult = result.get(entry.getKey()); + +for (Map.Entry subentry : entry.getValue().entrySet()) { +if (subResult.containsKey(subentry.getKey()) +&& subResult.get(subentry.getKey()) instanceof Map +&& subentry.getValue() instanceof Map) { +mergePr
[1/4] incubator-unomi git commit: UNOMI-187 fix referrer
Repository: incubator-unomi Updated Branches: refs/heads/master 3912e5c21 -> 19532afd8 http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/19532afd/extensions/web-tracker/javascript/yarn.lock -- diff --git a/extensions/web-tracker/javascript/yarn.lock b/extensions/web-tracker/javascript/yarn.lock index c3cfaaa..6b8f315 100644 --- a/extensions/web-tracker/javascript/yarn.lock +++ b/extensions/web-tracker/javascript/yarn.lock @@ -5,22 +5,26 @@ "@ndhoule/after@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@ndhoule/after/-/after-1.0.0.tgz#e6d86d121448247ac742ff3a61c63fae83ee1191"; + integrity sha1-5thtEhRIJHrHQv86YcY/roPuEZE= dependencies: "@ndhoule/arity" "^2.0.0" "@ndhoule/arity@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@ndhoule/arity/-/arity-2.0.0.tgz#26bfa0b9755ced9aea819d4e6e7a93db27a5b658"; + integrity sha1-Jr+guXVc7ZrqgZ1ObnqT2yeltlg= "@ndhoule/clone@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@ndhoule/clone/-/clone-1.0.0.tgz#0f68394a95008cf360370e101924564a70927afc"; + integrity sha1-D2g5SpUAjPNgNw4QGSRWSnCSevw= dependencies: component-type "^1.2.1" "@ndhoule/defaults@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@ndhoule/defaults/-/defaults-2.0.1.tgz#704aae3c601a4e4a1a10f0876a2d3253bc7d4d9b"; + integrity sha1-cEquPGAaTkoaEPCHai0yU7x9TZs= dependencies: "@ndhoule/drop" "^2.0.0" "@ndhoule/rest" "^2.0.0" @@ -28,56 +32,67 @@ "@ndhoule/drop@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@ndhoule/drop/-/drop-2.0.0.tgz#bcab1f3041555eaf84ce84e16475ff42ee949c8c"; + integrity sha1-vKsfMEFVXq+EzoThZHX/Qu6UnIw= "@ndhoule/each@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@ndhoule/each/-/each-2.0.1.tgz#bbed372a603e0713a3193c706a73ddebc5b426a9"; + integrity sha1-u+03KmA+BxOjGTxwanPd68W0Jqk= dependencies: "@ndhoule/keys" "^2.0.0" "@ndhoule/every@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@ndhoule/every/-/every-2.0.1.tgz#3907d8b6c430493dbb619c18071ce9055f8a106d"; + integrity sha1-OQfYtsQwST27YZwYBxzpBV+KEG0= dependencies: "@ndhoule/each" "^2.0.1" "@ndhoule/extend@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@ndhoule/extend/-/extend-2.0.0.tgz#8c9aa5c9b2f0a012104ffe214cd9746572b9aeb6"; + integrity sha1-jJqlybLwoBIQT/4hTNl0ZXK5rrY= "@ndhoule/foldl@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@ndhoule/foldl/-/foldl-2.0.1.tgz#788acedfa2cfd12ecb0b84d2beaf650d97be84f2"; + integrity sha1-eIrO36LP0S7LC4TSvq9lDZe+hPI= dependencies: "@ndhoule/each" "^2.0.1" "@ndhoule/includes@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@ndhoule/includes/-/includes-2.0.1.tgz#051ff5eb042c8fa17e7158f0a8a70172e1affaa5"; + integrity sha1-BR/16wQsj6F+cVjwqKcBcuGv+qU= dependencies: "@ndhoule/each" "^2.0.1" "@ndhoule/keys@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@ndhoule/keys/-/keys-2.0.0.tgz#3d64ae677c65a261747bf3a457c62eb292a4e0ce"; + integrity sha1-PWSuZ3xlomF0e/OkV8YuspKk4M4= "@ndhoule/map@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@ndhoule/map/-/map-2.0.1.tgz#f5ca0a47424ea67f46e2a6d499b9e9bc886aefa8"; + integrity sha1-9coKR0JOpn9G4qbUmbnpvIhq76g= dependencies: "@ndhoule/each" "^2.0.1" "@ndhoule/pick@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@ndhoule/pick/-/pick-2.0.0.tgz#e1eb1a6ca3243eef56daa095c3a1612c74a52156"; + integrity sha1-4esabKMkPu9W2qCVw6FhLHSlIVY= "@ndhoule/rest@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@ndhoule/rest/-/rest-2.0.0.tgz#0346b02a964a513ed2ba24d164f01d34f2107a0f"; + integrity sha1-A0awKpZKUT7SuiTRZPAdNPIQeg8= "@segment/analytics.js-core@^3.7.2": version "3.7.2" resolved "https://registry.yarnpkg.com/@segment/analytics.js-core/-/analytics.js-core-3.7.2.tgz#4e663b49ec5c9cb6baf40394ba798a6d84075a1f"; + integrity sha512-+I0jGiZka4oZVZCXCYmTdG0h0kebcqXLVWTgDp/ZiXGwUeVjT6yfk2H69j7NbAJDMUg09db0nEMbZcyjltX/Zw== dependencies: "@ndhoule/after" "^1.0.0" "@ndhoule/clone" "^1.0.0" @@ -118,6 +133,7 @@ "@segment/analytics.js-integration@^2.1.1": version "2.1.1" resolved "https://registry.yarnpkg.com/@segment/analytics.js-integration/-/analytics.js-integration-2.1.1.tgz#cdc58cdac19874eb3f088e4c3c74055dc4ef178c"; + integrity sha512-FDxtGy8LcJf+oTwl8KE/5Py01UVURsc0t4+fpIBIiPlZtE3tV0jTd/eMDQ0VyBfetjQ9rrq8tk8l52JPkQObBg== dependencies: "@ndhoule/after" "^1.0.0" "@ndhoule/clone" "^1.0.0" @@ -143,28 +159,34 @@ "@segment/base64-encode@^2.0.2": version "2.0.2" resolved "http://registry.npmjs.org/@segment/base64-encode/-/base64-encode-2.0.2.tgz#3ac90b9c28678dfd467e76191f7b1d063673034f"; + integrity sha1-OskLnChnjf1GfnYZH3sdBj
[3/4] incubator-unomi git commit: UNOMI-187 fix referrer
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/19532afd/extensions/web-tracker/javascript/dist/unomi-tracker.min.js -- diff --git a/extensions/web-tracker/javascript/dist/unomi-tracker.min.js b/extensions/web-tracker/javascript/dist/unomi-tracker.min.js index c2d5880..c3993ec 100644 --- a/extensions/web-tracker/javascript/dist/unomi-tracker.min.js +++ b/extensions/web-tracker/javascript/dist/unomi-tracker.min.js @@ -16,7 +16,7 @@ * * @license Apache-2.0 */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.unomiTracker=t()}}(function(){var t;return function(){function t(e,n,r){function o(a,s){if(!n[a]){if(!e[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var p=n[a]={exports:{}};e[a][0].call(p.exports,function(t){return o(e[a][1][t]||t)},p,p.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;ahttp://www.w3.org/1999/xlink","href";)||t.getAttribute("xlink:href");r.track(i,a),s&&"_blank"!==t.target&&!j(o)&&(E(o),r._callback(function(){window.location.hr ef=s}))})},t),this},r.prototype.trackSubmit=r.prototype.trackForm=function(t,e,n){if(!t)return this;"element"===$(t)&&(t=[t]);var r=this;return b(function(t){function o(o){E(o);var i=x.fn(e)?e(t):e,a=x.fn(n)?n(t):n;r.track(i,a),r._callback(function(){t.submit()})}if("element"!==$(t))throw new TypeError("Must pass HTMLElement to `analytics.trackForm`.");var i=window.jQuery||window.Zepto;i?i(t).submit(o):C(t,"submit",o)},t),this},r.prototype.page=function(t,e,n,r,o){x.fn(r)&&(o=r,r=null),x.fn(n)&&(o=n,r=n=null),x.fn(e)&&(o=e,r=n=e=null),"object"===$(t)&&(r=e,n=t,e=t=null),"object"===$(e)&&(r=n,n=e,e=null),"string"===$(t)&&"string"!==$(e)&&(e=t,t=null),n=d(n)||{},e&&(n.name=e),t&&(n.category=t);var i=A();v(n,i);var a=S(k(i),n);x.empty(a)||(r=r||{},r.context=r.context||{},r.context.page=a);var s=this.normalize({properties:n,category:t,options:r,name:e});return this.options.integrations&&v(s.integrations,this.options.integrations),this._invoke("page",new u(s)),this.emit("page",t,e,n,r),t his._callback(o),this},r.prototype.pageview=function(t){var e={};return t&&(e.path=t),this.page(e),this},r.prototype.alias=function(t,e,n,r){x.fn(n)&&(r=n,n=null),x.fn(e)&&(r=e,n=null,e=null),x.object(e)&&(n=e,e=null);var o=this.normalize({options:n,previousId:e,userId:t});return this.options.integrations&&v(o.integrations,this.options.integrations),this._invoke("alias",new i(o)),this.emit("alias",t,e,n),this._callback(r),this},r.prototype.ready=function(t){return x.fn(t)&&(this._readied?T(t):this.once("ready",t)),this},r.prototype.timeout=function(t){this._timeout=t},r.prototype.debug=function(t){!arguments.length||t?m.enable("analytics:"+(t||"*")):m.disable()},r.prototype._options=function(t){return t=t||{},this.options=t,y.options(t.cookie),g.options(t.metrics),N.options(t.localStorage),z.options(t.user),_.options(t.group),this},r.prototype._callback=function(t){return x.fn(t)&&(this._timeout?setTimeout(t,this._timeout):T(t)),this},r.prototype._invoke=function(t,e){var n=this;g.i ncrement("analytics_js.invoke",{method:t}),this.emit("invoke",e);var r=n.failedInitializations||[];return b(function(o,i){if(e.enabled(i))if(r.indexOf(i)>=0)n.log("Skipping invokation of .%s method of %s integration. Integation failed to initialize properly.",t,i);else try{g.increment("analytics_js.integration.invoke",{method:t,integration_name:o.name}),o.invoke.call(o,t,e)}catch(e){g.increment("analytics_js.integration.invoke.error",{method:t,integration_name:o.name}),n.log("Error invoking .%s method of %s integration: %o",t,i,e)}},this._integrations),this},r.prototype.push=function(t){var e=t.shift();this[e]&&this[e].apply(this,t)},r.prototype.reset=function(){this.user().logout(),this.group().logout()},r.prototype._parseQuery=function(t){function e(t,e){var n,r=t.length;return w(function(e,o,i){return i.substr(0,r)===t&&(n=i.substr(r),e[n]=o),e},{},e)}var n=D.parse(t),r=e("ajs_trait_",n),o=e("ajs_prop_",n);return n.ajs_uid&&this.identify(n.ajs_uid,r),n.ajs_event&&this.track(n.ajs _event,o),n.ajs_aid&&z.anonymousId(n.ajs_aid),this},r.prototype.normalize=function(t){return t=O(t,k(this._integrations)),t.anonymousId&&z.anonymousId(t.anonymousId),t.anonymousId=z.anonymousId(),t.context.page=v(t.context.page||{},A()),t},r.prototype._mergeInitializeAndPlanIntegrations=function(t){if(!this.options.integrations)return t;var e,n=h({},this.options.integrations);!1===t.All&&(n={All:!1});for(e in t)t.hasOwnProperty(e)&&!1!==this.options.integrations[e]&&(n[e]=t[e]);return n},r.prototype.noConflict=function
[4/4] incubator-unomi git commit: UNOMI-187 fix referrer
UNOMI-187 fix referrer Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/19532afd Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/19532afd Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/19532afd Branch: refs/heads/master Commit: 19532afd8344fd554d353b2e878d54b5795cbe4d Parents: 3912e5c Author: dgaillard Authored: Tue Oct 30 17:47:37 2018 +0100 Committer: dgaillard Committed: Tue Oct 30 17:47:37 2018 +0100 -- .../javascript/dist/unomi-tracker.js| 46 ++- .../javascript/dist/unomi-tracker.min.js| 6 +- extensions/web-tracker/javascript/package.json | 2 +- .../analytics.js-integration-apache-unomi.js| 46 ++- extensions/web-tracker/javascript/yarn.lock | 384 +++ 5 files changed, 476 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/19532afd/extensions/web-tracker/javascript/dist/unomi-tracker.js -- diff --git a/extensions/web-tracker/javascript/dist/unomi-tracker.js b/extensions/web-tracker/javascript/dist/unomi-tracker.js index 6117da4..7f45ec3 100644 --- a/extensions/web-tracker/javascript/dist/unomi-tracker.js +++ b/extensions/web-tracker/javascript/dist/unomi-tracker.js @@ -12011,7 +12011,49 @@ Unomi.prototype.fillPageData = function(unomiPage, props) { unomiPage.pageInfo.pagePath = unomiPage.pageInfo.pagePath || props.path; unomiPage.pageInfo.destinationURL = unomiPage.pageInfo.destinationURL || props.url; unomiPage.pageInfo.referringURL = unomiPage.pageInfo.referringURL || props.referrer; -} +this.processReferrer(); +}; + +Unomi.prototype.processReferrer = function() { +var referrerURL = document.referrer; +if (referrerURL) { +// parse referrer URL +var referrer = document.createElement('a'); +referrer.href = referrerURL; + +// only process referrer if it's not coming from the same site as the current page +var local = document.createElement('a'); +local.href = document.URL; +if (referrer.host !== local.host) { +// get search element if it exists and extract search query if available +var search = referrer.search; +var query = undefined; +if (search && search != '') { +// parse parameters +var queryParams = [], param; +var queryParamPairs = search.slice(1).split('&'); +for (var i = 0; i < queryParamPairs.length; i++) { +param = queryParamPairs[i].split('='); +queryParams.push(param[0]); +queryParams[param[0]] = param[1]; +} + +// try to extract query: q is Google-like (most search engines), p is Yahoo +query = queryParams.q || queryParams.p; +query = decodeURIComponent(query).replace(/\+/g, ' '); +} + +// add data to digitalData +if (window.digitalData && window.digitalData.page && window.digitalData.page.pageInfo) { +window.digitalData.page.pageInfo.referrerHost = referrer.host; +window.digitalData.page.pageInfo.referrerQuery = query; +} + +// register referrer event +this.registerEvent(this.buildEvent('viewFromReferrer', this.buildTargetPage())); +} +} +}; /** @@ -12117,7 +12159,7 @@ Unomi.prototype.onpersonalize = function (msg) { }; window.digitalData.personalizationCallback = window.digitalData.personalizationCallback || []; window.digitalData.personalizationCallback.push({personalization: msg.personalization, callback: msg.callback}); -}, +}; /** * This function return the basic structure for an event, it must be adapted to your need
[2/4] incubator-unomi git commit: UNOMI-187 fix referrer
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/19532afd/extensions/web-tracker/javascript/package.json -- diff --git a/extensions/web-tracker/javascript/package.json b/extensions/web-tracker/javascript/package.json index 342de5b..10bcf38 100644 --- a/extensions/web-tracker/javascript/package.json +++ b/extensions/web-tracker/javascript/package.json @@ -1,6 +1,6 @@ { "name": "unomi-analytics", - "version": "1.0.3", + "version": "1.0.4", "description": "The Apache Unomi analytics.js integration.", "main": "dist/unomi-tracker.js", "keywords": [ http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/19532afd/extensions/web-tracker/javascript/src/analytics.js-integration-apache-unomi.js -- diff --git a/extensions/web-tracker/javascript/src/analytics.js-integration-apache-unomi.js b/extensions/web-tracker/javascript/src/analytics.js-integration-apache-unomi.js index 7de7475..2f90277 100644 --- a/extensions/web-tracker/javascript/src/analytics.js-integration-apache-unomi.js +++ b/extensions/web-tracker/javascript/src/analytics.js-integration-apache-unomi.js @@ -115,7 +115,49 @@ Unomi.prototype.fillPageData = function(unomiPage, props) { unomiPage.pageInfo.pagePath = unomiPage.pageInfo.pagePath || props.path; unomiPage.pageInfo.destinationURL = unomiPage.pageInfo.destinationURL || props.url; unomiPage.pageInfo.referringURL = unomiPage.pageInfo.referringURL || props.referrer; -} +this.processReferrer(); +}; + +Unomi.prototype.processReferrer = function() { +var referrerURL = document.referrer; +if (referrerURL) { +// parse referrer URL +var referrer = document.createElement('a'); +referrer.href = referrerURL; + +// only process referrer if it's not coming from the same site as the current page +var local = document.createElement('a'); +local.href = document.URL; +if (referrer.host !== local.host) { +// get search element if it exists and extract search query if available +var search = referrer.search; +var query = undefined; +if (search && search != '') { +// parse parameters +var queryParams = [], param; +var queryParamPairs = search.slice(1).split('&'); +for (var i = 0; i < queryParamPairs.length; i++) { +param = queryParamPairs[i].split('='); +queryParams.push(param[0]); +queryParams[param[0]] = param[1]; +} + +// try to extract query: q is Google-like (most search engines), p is Yahoo +query = queryParams.q || queryParams.p; +query = decodeURIComponent(query).replace(/\+/g, ' '); +} + +// add data to digitalData +if (window.digitalData && window.digitalData.page && window.digitalData.page.pageInfo) { +window.digitalData.page.pageInfo.referrerHost = referrer.host; +window.digitalData.page.pageInfo.referrerQuery = query; +} + +// register referrer event +this.registerEvent(this.buildEvent('viewFromReferrer', this.buildTargetPage())); +} +} +}; /** @@ -221,7 +263,7 @@ Unomi.prototype.onpersonalize = function (msg) { }; window.digitalData.personalizationCallback = window.digitalData.personalizationCallback || []; window.digitalData.personalizationCallback.push({personalization: msg.personalization, callback: msg.callback}); -}, +}; /** * This function return the basic structure for an event, it must be adapted to your need
incubator-unomi git commit: UNOMI-204 fix typo
Repository: incubator-unomi Updated Branches: refs/heads/master 291636af4 -> 3912e5c21 UNOMI-204 fix typo Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/3912e5c2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/3912e5c2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/3912e5c2 Branch: refs/heads/master Commit: 3912e5c21e1d78f532d11e8a2cf30e1ff909b8fa Parents: 291636a Author: dgaillard Authored: Thu Oct 25 18:58:11 2018 +0200 Committer: dgaillard Committed: Thu Oct 25 18:58:23 2018 +0200 -- api/src/main/java/org/apache/unomi/api/services/SegmentService.java | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/3912e5c2/api/src/main/java/org/apache/unomi/api/services/SegmentService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/SegmentService.java b/api/src/main/java/org/apache/unomi/api/services/SegmentService.java index 1ed152d..e5d4b29 100644 --- a/api/src/main/java/org/apache/unomi/api/services/SegmentService.java +++ b/api/src/main/java/org/apache/unomi/api/services/SegmentService.java @@ -51,7 +51,6 @@ public interface SegmentService { /** * Retrieves segment metadatas for segments in the specified scope, ordered according to the specified {@code sortBy} String and and paged: only {@code size} of them are * retrieved, starting with the {@code offset}-th one. - * * TODO: remove? * * @param scope the scope for which we want to retrieve segment metadata
incubator-unomi git commit: UNOMI-202 fix scheduler for geonames service
Repository: incubator-unomi Updated Branches: refs/heads/master 6d6c024ff -> 300f1979b UNOMI-202 fix scheduler for geonames service Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/300f1979 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/300f1979 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/300f1979 Branch: refs/heads/master Commit: 300f1979b2bb4012d20f51ac39c425314ef08c77 Parents: 6d6c024 Author: dgaillard Authored: Mon Oct 22 16:32:54 2018 +0200 Committer: dgaillard Committed: Mon Oct 22 16:32:54 2018 +0200 -- .../apache/unomi/geonames/services/GeonamesServiceImpl.java | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/300f1979/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java -- diff --git a/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java b/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java index 2645281..22ac964 100644 --- a/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java +++ b/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java @@ -98,12 +98,12 @@ public class GeonamesServiceImpl implements GeonamesService { } final File f = new File(pathToGeonamesDatabase); if (f.exists()) { - schedulerService.getScheduleExecutorService().scheduleWithFixedDelay(new TimerTask() { +schedulerService.getScheduleExecutorService().schedule(new TimerTask() { @Override public void run() { importGeoNameDatabase(f); } -}, 0, refreshDbInterval, TimeUnit.MILLISECONDS); +}, refreshDbInterval, TimeUnit.MILLISECONDS); } } @@ -111,12 +111,12 @@ public class GeonamesServiceImpl implements GeonamesService { Map> typeMappings = persistenceService.getPropertiesMapping(GeonameEntry.ITEM_TYPE); if (typeMappings == null || typeMappings.size() == 0) { logger.warn("Type mappings for type {} are not yet installed, delaying import until they are ready!", GeonameEntry.ITEM_TYPE); - schedulerService.getScheduleExecutorService().scheduleWithFixedDelay(new TimerTask() { +schedulerService.getScheduleExecutorService().schedule(new TimerTask() { @Override public void run() { importGeoNameDatabase(f); } -}, 0, refreshDbInterval, TimeUnit.MILLISECONDS); +}, refreshDbInterval, TimeUnit.MILLISECONDS); return; } else { // let's check that the mappings are correct
[1/5] incubator-unomi git commit: UNOMI-205 remove files
Repository: incubator-unomi Updated Branches: refs/heads/master 5ed92f9cc -> 6d6c024ff http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6d6c024f/src/site/resources/images/unomi-86x20.png -- diff --git a/src/site/resources/images/unomi-86x20.png b/src/site/resources/images/unomi-86x20.png deleted file mode 100644 index 09052ee..000 Binary files a/src/site/resources/images/unomi-86x20.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6d6c024f/src/site/resources/images/unomi-features.png -- diff --git a/src/site/resources/images/unomi-features.png b/src/site/resources/images/unomi-features.png deleted file mode 100644 index 5c543c8..000 Binary files a/src/site/resources/images/unomi-features.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6d6c024f/src/site/resources/images/unomi-icon.png -- diff --git a/src/site/resources/images/unomi-icon.png b/src/site/resources/images/unomi-icon.png deleted file mode 100644 index 8f40e77..000 Binary files a/src/site/resources/images/unomi-icon.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6d6c024f/src/site/resources/images/unomi-input-output.png -- diff --git a/src/site/resources/images/unomi-input-output.png b/src/site/resources/images/unomi-input-output.png deleted file mode 100644 index a74b99e..000 Binary files a/src/site/resources/images/unomi-input-output.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6d6c024f/src/site/resources/images/unomi-logical-architecture-diagram.png -- diff --git a/src/site/resources/images/unomi-logical-architecture-diagram.png b/src/site/resources/images/unomi-logical-architecture-diagram.png deleted file mode 100644 index f7723d0..000 Binary files a/src/site/resources/images/unomi-logical-architecture-diagram.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6d6c024f/src/site/resources/images/unomi-request.png -- diff --git a/src/site/resources/images/unomi-request.png b/src/site/resources/images/unomi-request.png deleted file mode 100755 index fdba277..000 Binary files a/src/site/resources/images/unomi-request.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6d6c024f/src/site/resources/images/unomi.png -- diff --git a/src/site/resources/images/unomi.png b/src/site/resources/images/unomi.png deleted file mode 100644 index 6bb93c3..000 Binary files a/src/site/resources/images/unomi.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6d6c024f/src/site/resources/images/unomi.xcf -- diff --git a/src/site/resources/images/unomi.xcf b/src/site/resources/images/unomi.xcf deleted file mode 100644 index 2e453a2..000 Binary files a/src/site/resources/images/unomi.xcf and /dev/null differ http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6d6c024f/src/site/site.xml -- diff --git a/src/site/site.xml b/src/site/site.xml deleted file mode 100644 index 1a93a2d..000 --- a/src/site/site.xml +++ /dev/null @@ -1,146 +0,0 @@ - - -http://www.w3.org/2001/XMLSchema-instance"; xmlns="http://maven.apache.org/DECORATION/1.7.0"; - xsi:schemaLocation="http://maven.apache.org/DECORATION/1.7.0 http://maven.apache.org/xsd/decoration-1.7.0.xsd";> - - -lt.velykis.maven.skins -reflow-maven-skin -1.1.1 - - - -http://karaf.apache.org/"; - img="http://karaf.apache.org/images/karaf-logo.png"/> - - - - -UA-70313240-1 - - - - -false -true -default -true -github - http://unomi.incubator.apache.org/ - - -http://unomi.incubator.apache.org - - -%2$s | %1$s -sidebar - - Download|Documentation|Standard|Contribute|Privacy|Community - -Download|Contribute -Documentation -Community|Standard|Privacy -reports - - -Powered by Apache Karaf - - - -Welcome -false - -
[2/5] incubator-unomi git commit: UNOMI-205 remove files
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6d6c024f/src/site/markdown/versions/master/configuration.md -- diff --git a/src/site/markdown/versions/master/configuration.md b/src/site/markdown/versions/master/configuration.md deleted file mode 100644 index a5d97fb..000 --- a/src/site/markdown/versions/master/configuration.md +++ /dev/null @@ -1,350 +0,0 @@ - - -Configuration -= - -Changing the default configuration --- - -If you want to change the default configuration, you can perform any modification you want in the $MY_KARAF_HOME/etc directory. - -The context server configuration is kept in the $MY_KARAF_HOME/etc/org.apache.unomi.cluster.cfg . It defines the -addresses where it can be found : - -contextserver.publicAddress=https://localhost:9443 -contextserver.internalAddress=http://127.0.0.1:8181 - -If you need to specify an Elasticsearch cluster name, or a host and port that are different than the default, -it is recommended to do this BEFORE you start the server for the first time, or you will loose all the data -you have stored previously. - -To change these settings, you will need to modify a file called - -$MY_KARAF_HOME/etc/org.apache.unomi.persistence.elasticsearch.cfg - -with the following contents: - -cluster.name=contextElasticSearch -# The elasticSearchAddresses may be a comma seperated list of host names and ports such as -# hostA:9300,hostB:9300 -# Note: the port number must be repeated for each host. -elasticSearchAddresses=localhost:9300 -index.name=context - -Secured events configuration - - -Unomi secures some events by default. You can find the default configuration in the following file (created after the -first server startup): - -$MY_KARAF_HOME/etc/org.apache.unomi.thirdparty.cfg - -Ususally, login events, which operate on profiles and do merge on protected properties, must be secured. For each -trusted third party server, you need to add these 3 lines : - -thirdparty.provider1.key=secret-key -thirdparty.provider1.ipAddresses=127.0.0.1,::1 -thirdparty.provider1.allowedEvents=login,updateProperties - -The events set in allowedEvents will be secured and will only be accepted if the call comes from the specified IP -address, and if the secret-key is passed in the X-Unomi-Peer header. - -Installing the MaxMind GeoIPLite2 IP lookup database - - -The Context Server requires an IP database in order to resolve IP addresses to user location. -The GeoLite2 database can be downloaded from MaxMind here : -http://dev.maxmind.com/geoip/geoip2/geolite2/ - -Simply download the GeoLite2-City.mmdb file into the "etc" directory. - -Installing Geonames database - - -Context server includes a geocoding service based on the geonames database ( http://www.geonames.org/ ). It can be -used to create conditions on countries or cities. - -In order to use it, you need to install the Geonames database into . Get the "allCountries.zip" database from here : -http://download.geonames.org/export/dump/ - -Download it and put it in the "etc" directory, without unzipping it. -Edit $MY_KARAF_HOME/etc/org.apache.unomi.geonames.cfg and set request.geonamesDatabase.forceImport to true, import should start right away. -Otherwise, import should start at the next startup. Import runs in background, but can take about 15 minutes. -At the end, you should have about 4 million entries in the geonames index. - -REST API Security -- - -The Context Server REST API is protected using JAAS authentication and using Basic or Digest HTTP auth. -By default, the login/password for the REST API full administrative access is "karaf/karaf". - -The generated package is also configured with a default SSL certificate. You can change it by following these steps : - -1. Replace the existing keystore in $MY_KARAF_HOME/etc/keystore by your own certificate : - -http://wiki.eclipse.org/Jetty/Howto/Configure_SSL - -2. Update the keystore and certificate password in $MY_KARAF_HOME/etc/custom.properties file : - -``` -org.osgi.service.http.secure.enabled = true -org.ops4j.pax.web.ssl.keystore=${karaf.etc}/keystore -org.ops4j.pax.web.ssl.password=changeme -org.ops4j.pax.web.ssl.keypassword=changeme -org.osgi.service.http.port.secure=9443 -``` - -You should now have SSL setup on Karaf with your certificate, and you can test it by trying to access it on port 9443. - -3. Changing the default Karaf password can be done by modifying the etc/users.properties file - -Automatic profile merging -- - -The context server is capable of merging profiles based on a common property value. In order to use this, you must -add the MergeProfileOnPropertyAction to a rule (such as a logi
[4/5] incubator-unomi git commit: UNOMI-205 remove files
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6d6c024f/src/site/markdown/versions/1.1/getting-started.md -- diff --git a/src/site/markdown/versions/1.1/getting-started.md b/src/site/markdown/versions/1.1/getting-started.md deleted file mode 100644 index 809a75b..000 --- a/src/site/markdown/versions/1.1/getting-started.md +++ /dev/null @@ -1,425 +0,0 @@ - - -# Getting started with Unomi - -We will first get you up and running with an example. We will then lift the corner of the cover somewhat and explain in greater details what just happened. - -## Prerequisites -This document assumes that you are already familiar with Unomi's [concepts](concepts.html). On the technical side, we also assume working knowledge of [git](https://git-scm.com/) to be able to retrieve the code for Unomi and the example. Additionnally, you will require a working Java 7 or above install. Refer to http://www.oracle.com/technetwork/java/javase/ for details on how to download and install Java SE 7 or greater. - -## Running Unomi - -### Building Unomi - -1. Get the code: `git clone https://git-wip-us.apache.org/repos/asf/incubator-unomi.git` -2. Build and install according to the [instructions](building-and-deploying.html) and install Unomi. - -### Start Unomi -Start Unomi according to the [instructions](building-and-deploying.html#Deploying_the_generated_package). Once you have Karaf running, - you should wait until you see the following messages on the Karaf console: - -``` -Initializing user list service endpoint... -Initializing geonames service endpoint... -Initializing segment service endpoint... -Initializing scoring service endpoint... -Initializing campaigns service endpoint... -Initializing rule service endpoint... -Initializing profile service endpoint... -Initializing cluster service endpoint... -``` - -This indicates that all the Unomi services are started and ready to react to requests. You can then open a browser and go to `http://localhost:8181/cxs` to see the list of -available RESTful services or retrieve an initial context at `http://localhost:8181/context.json` (which isn't very useful at this point). - -### Building the tweet button sample -In your local copy of the Unomi repository and run: - -``` -cd samples/tweet-button-plugin -mvn clean install -``` - -This will compile and create the OSGi bundle that can be deployed on Unomi to extend it. - -### Deploying the tweet button sample -In standard Karaf fashion, you will need to copy the sample bundle to your Karaf `deploy` directory. - -If you are using the packaged version of Unomi (as opposed to deploying it to your own Karaf version), you can simply run, assuming your current directory is `samples/tweet-button-plugin` and that you uncompressed the archive in the directory it was created: - -``` -cp target/tweet-button-plugin-1.0.0-incubating-SNAPSHOT.jar ../../package/target/unomi-1.0.0-incubating-SNAPSHOT/deploy -``` - - -### Testing the sample -You can now go to http://localhost:8181/index.html to test the sample code. The page is very simple, you will see a Twitter button, which, once clicked, will open a new window to tweet about the current page. The original page should be updated with the new values of the properties coming from Unomi. Additionnally, the raw JSON response is displayed. - -We will now explain in greater details some concepts and see how the example works. - -## Interacting with the context server -There are essentially two modalities to interact with the context server, reflecting different types of Unomi users: context server clients and context server integrators. - -**Context server clients** are usually web applications or content management systems. They interact with Unomi by providing raw, uninterpreted contextual data in the form of events and associated metadata. That contextual data is then processed by the context server to be fed to clients once actionable. In that sense context server clients are both consumers and producers of contextual data. Context server clients will mostly interact with Unomi using a single entry point called the `ContextServlet`, requesting context for the current user and providing any triggered events along the way. - -On the other hand, **context server integrators** provide ways to feed more structured data to the context server either to integrate with third party services or to provide analysis of the uninterpreted data provided by context server clients. Such integration will mostly be done using Unomi's API either directly using Unomi plugins or via the provided REST APIs. However, access to REST APIs is restricted due for security reasons, requiring privileged access to the Unomi server, making things a little more complex to set up. - -For simplicity's sake, this document will focus solely on the first use case and will interact only with the context servlet. - -## Ret
[3/5] incubator-unomi git commit: UNOMI-205 remove files
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6d6c024f/src/site/markdown/versions/1.2/getting-started.md -- diff --git a/src/site/markdown/versions/1.2/getting-started.md b/src/site/markdown/versions/1.2/getting-started.md deleted file mode 100644 index 6c4380d..000 --- a/src/site/markdown/versions/1.2/getting-started.md +++ /dev/null @@ -1,107 +0,0 @@ - - -# Getting started with Unomi - -We will first get you up and running with an example. We will then lift the corner of the cover somewhat and explain in greater details what just happened. - -## Prerequisites -This document assumes that you are already familiar with Unomi's [concepts](concepts.html). On the technical side, we also assume working knowledge of [git](https://git-scm.com/) to be able to retrieve the code for Unomi and the example. Additionnally, you will require a working Java 7 or above install. Refer to http://www.oracle.com/technetwork/java/javase/ for details on how to download and install Java SE 7 or greater. - -## Running Unomi - -### Building Unomi - -1. Get the code: `git clone https://git-wip-us.apache.org/repos/asf/incubator-unomi.git` -2. Build and install according to the [instructions](building-and-deploying.html) and install Unomi. - -### Start Unomi -Start Unomi according to the [instructions](building-and-deploying.html#Deploying_the_generated_package). Once you have Karaf running, - you should wait until you see the following messages on the Karaf console: - -``` -Initializing user list service endpoint... -Initializing geonames service endpoint... -Initializing segment service endpoint... -Initializing scoring service endpoint... -Initializing campaigns service endpoint... -Initializing rule service endpoint... -Initializing profile service endpoint... -Initializing cluster service endpoint... -``` - -This indicates that all the Unomi services are started and ready to react to requests. You can then open a browser and go to `http://localhost:8181/cxs` to see the list of -available RESTful services or retrieve an initial context at `http://localhost:8181/context.json` (which isn't very useful at this point). - -### Request examples - - Retrieving your first context - -You can retrieve a context using curl like this : - -curl http://localhost:8181/context.js?sessionId=1234 - -This will retrieve a JavaScript script that contains a `cxs` object that contains the context with the current user -profile, segments, scores as well as functions that makes it easier to perform further requests (such as collecting -events using the cxs.collectEvents() function). - - Retrieving a context as a JSON object. - -If you prefer to retrieve a pure JSON object, you can simply use a request formed like this: - -curl http://localhost:8181/context.json?sessionId=1234 - - Accessing profile properties in a context - -By default, in order to optimize the amount of data sent over the network, Apache Unomi will not send the content of -the profile or session properties. If you need this data, you must send a JSON object to configure the resulting output -of the context.js(on) servlet. - -Here is an example that will retrieve all the session and profile properties. - -curl -H "Content-Type: application/json" -X POST -d '{"source":{"itemId":"homepage","itemType":"page","scope":"example"},"requiredProfileProperties":["*"],"requiredSessionProperties":["*"],"requireSegments":true}' http://localhost:8181/context.json?sessionId=1234 - -The `requiredProfileProperties` and `requiredSessionProperties` are properties that take an array of property names -that should be retrieved. In this case we use the wildcard character '*' to say we want to retrieve all the available -properties. The structure of the JSON object that you should send is a JSON-serialized version of the [ContextRequest](http://unomi.incubator.apache.org/unomi-api/apidocs/org/apache/unomi/api/ContextRequest.html) -Java class. - - Sending events using the context servlet - -At the same time as you are retrieving the context, you can also directly send events in the ContextRequest object as -illustrated in the following example: - -curl -H "Content-Type: application/json" -X POST -d '{"source":{"itemId":"homepage","itemType":"page","scope":"example"},"events":[{"eventType":"view","scope": "example","source":{"itemType": "site","scope":"example","itemId": "mysite"},"target":{"itemType":"page","scope":"example","itemId":"homepage","properties":{"pageInfo":{"referringURL":""]}' http://localhost:8181/context.json?sessionId=1234 - -Upon received events, Apache Unomi will execute all the rules that match the current context, and return an updated context. -This way of sending events is usually used upon first loading of a page. If you want to send events after the page has -finished loading you could either do a se
[5/5] incubator-unomi git commit: UNOMI-205 remove files
UNOMI-205 remove files Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/6d6c024f Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/6d6c024f Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/6d6c024f Branch: refs/heads/master Commit: 6d6c024ff09b72d75b18c55371d824d7322f66b3 Parents: 5ed92f9 Author: dgaillard Authored: Fri Oct 19 17:14:26 2018 +0200 Committer: dgaillard Committed: Fri Oct 19 17:14:26 2018 +0200 -- src/site/markdown/archive.md| 61 --- src/site/markdown/download.md | 50 --- src/site/markdown/index.md | 127 -- src/site/markdown/license.md| 30 -- src/site/markdown/main.md | 55 --- src/site/markdown/maturity-model-report.md | 221 -- src/site/markdown/migrating-elasticsearch.md| 50 --- src/site/markdown/privacy-policy.md | 41 -- src/site/markdown/usecases.md | 85 .../versions/1.1/building-and-deploying.md | 189 - src/site/markdown/versions/1.1/clustering.md| 83 src/site/markdown/versions/1.1/concepts.md | 209 - src/site/markdown/versions/1.1/configuration.md | 273 .../markdown/versions/1.1/getting-started.md| 425 --- .../versions/1.2/building-and-deploying.md | 225 -- src/site/markdown/versions/1.2/clustering.md| 66 --- src/site/markdown/versions/1.2/concepts.md | 209 - src/site/markdown/versions/1.2/configuration.md | 310 -- src/site/markdown/versions/1.2/connectors.md| 26 -- .../markdown/versions/1.2/custom-extensions.md | 369 .../markdown/versions/1.2/getting-started.md| 107 - src/site/markdown/versions/1.2/login-sample.md | 56 --- .../versions/1.2/salesforce-connector.md| 165 --- src/site/markdown/versions/1.2/samples.md | 23 - .../markdown/versions/1.2/twitter-sample.md | 403 -- .../versions/1.2/weather-update-sample.md | 19 - .../versions/master/building-and-deploying.md | 229 -- src/site/markdown/versions/master/clustering.md | 66 --- src/site/markdown/versions/master/concepts.md | 208 - .../markdown/versions/master/configuration.md | 350 --- src/site/markdown/versions/master/connectors.md | 26 -- .../markdown/versions/master/consent-api.md | 135 -- .../versions/master/custom-extensions.md| 376 .../markdown/versions/master/getting-started.md | 107 - .../markdown/versions/master/login-sample.md| 56 --- .../versions/master/salesforce-connector.md | 156 --- src/site/markdown/versions/master/samples.md| 23 - .../markdown/versions/master/twitter-sample.md | 403 -- .../versions/master/weather-update-sample.md| 19 - .../resources/images/apache-unomi-380x85.png| Bin 28161 -> 0 bytes .../resources/images/apache-unomi-571x128.png | Bin 34486 -> 0 bytes .../resources/images/apache-unomi-large.png | Bin 60570 -> 0 bytes src/site/resources/images/incubator-logo.png| Bin 8923 -> 0 bytes src/site/resources/images/unomi-100x99.png | Bin 18543 -> 0 bytes src/site/resources/images/unomi-200x56.png | Bin 20393 -> 0 bytes src/site/resources/images/unomi-86x20.png | Bin 17610 -> 0 bytes src/site/resources/images/unomi-features.png| Bin 145199 -> 0 bytes src/site/resources/images/unomi-icon.png| Bin 33427 -> 0 bytes .../resources/images/unomi-input-output.png | Bin 87222 -> 0 bytes .../unomi-logical-architecture-diagram.png | Bin 41571 -> 0 bytes src/site/resources/images/unomi-request.png | Bin 132731 -> 0 bytes src/site/resources/images/unomi.png | Bin 57947 -> 0 bytes src/site/resources/images/unomi.xcf | Bin 177483 -> 0 bytes src/site/site.xml | 146 --- 54 files changed, 6177 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6d6c024f/src/site/markdown/archive.md -- diff --git a/src/site/markdown/archive.md b/src/site/markdown/archive.md deleted file mode 100644 index a252a83..000 --- a/src/site/markdown/archive.md +++ /dev/null @@ -1,61 +0,0 @@ - - -# Previous releases of Apache Unomi - -## Verify the integrity of the files - -It is essential that you verify the integrity of the downloaded files using the PGP or MD5 signatures. - -The PGP signatures can be verified using PGP or GPG. First download the [KEYS](http://www.apache.org/dist/incubator/unomi/KEYS) as well as the PGP signatu
incubator-unomi git commit: UNOMI-202 add test with patch on ConditionType and ActionType
Repository: incubator-unomi Updated Branches: refs/heads/master d5c560f39 -> 5ed92f9cc UNOMI-202 add test with patch on ConditionType and ActionType Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/5ed92f9c Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/5ed92f9c Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/5ed92f9c Branch: refs/heads/master Commit: 5ed92f9cc03230a4c32f1c15c7ad2bb765bdebcb Parents: d5c560f Author: dgaillard Authored: Fri Oct 19 17:05:52 2018 +0200 Committer: dgaillard Committed: Fri Oct 19 17:05:52 2018 +0200 -- .../java/org/apache/unomi/itests/PatchIT.java | 45 itests/src/test/resources/patch4.json | 19 + itests/src/test/resources/patch5.json | 17 3 files changed, 81 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/5ed92f9c/itests/src/test/java/org/apache/unomi/itests/PatchIT.java -- diff --git a/itests/src/test/java/org/apache/unomi/itests/PatchIT.java b/itests/src/test/java/org/apache/unomi/itests/PatchIT.java index 8016693..412395e 100644 --- a/itests/src/test/java/org/apache/unomi/itests/PatchIT.java +++ b/itests/src/test/java/org/apache/unomi/itests/PatchIT.java @@ -18,6 +18,9 @@ package org.apache.unomi.itests; import org.apache.unomi.api.Patch; import org.apache.unomi.api.PropertyType; +import org.apache.unomi.api.actions.ActionType; +import org.apache.unomi.api.conditions.ConditionType; +import org.apache.unomi.api.services.DefinitionsService; import org.apache.unomi.api.services.PatchService; import org.apache.unomi.api.services.ProfileService; import org.apache.unomi.persistence.spi.CustomObjectMapper; @@ -50,6 +53,10 @@ public class PatchIT extends BaseIT { protected ProfileService profileService; @Inject +@Filter(timeout = 6) +protected DefinitionsService definitionsService; + +@Inject protected BundleContext bundleContext; @Test @@ -107,4 +114,42 @@ public class PatchIT extends BaseIT { profileService.setPropertyType(income); } } + +@Test +public void testPatchOnConditionType() throws IOException, InterruptedException { +ConditionType formCondition = definitionsService.getConditionType("formEventCondition"); + Assert.assertTrue(formCondition.getMetadata().getSystemTags().contains("usableInPastEventCondition")); + +try { +Patch patch = CustomObjectMapper.getObjectMapper().readValue(bundleContext.getBundle().getResource("patch4.json"), Patch.class); + +patchService.patch(patch); + +Thread.sleep(1); + +ConditionType newFormCondition = definitionsService.getConditionType("formEventCondition"); + Assert.assertFalse(newFormCondition.getMetadata().getSystemTags().contains("usableInPastEventCondition")); +} finally { +definitionsService.setConditionType(formCondition); +} +} + +@Test +public void testPatchOnActionType() throws IOException, InterruptedException { +ActionType mailAction = definitionsService.getActionType("sendMailAction"); + Assert.assertTrue(mailAction.getMetadata().getSystemTags().contains("availableToEndUser")); + +try { +Patch patch = CustomObjectMapper.getObjectMapper().readValue(bundleContext.getBundle().getResource("patch5.json"), Patch.class); + +patchService.patch(patch); + +Thread.sleep(1); + +ActionType newMailAction = definitionsService.getActionType("sendMailAction"); + Assert.assertFalse(newMailAction.getMetadata().getSystemTags().contains("availableToEndUser")); +} finally { +definitionsService.setActionType(mailAction); +} +} } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/5ed92f9c/itests/src/test/resources/patch4.json -- diff --git a/itests/src/test/resources/patch4.json b/itests/src/test/resources/patch4.json new file mode 100644 index 000..9f848cb --- /dev/null +++ b/itests/src/test/resources/patch4.json @@ -0,0 +1,19 @@ +{ + "itemId": "formEventCondition-patch1", + "patchedItemId": "formEventCondition", + "patchedItemType": "condition", + "operation": "patch", + "data": [ +{ + "op": "replace", + "path": "/metadata/systemTags", + "value"
incubator-unomi git commit: UNOMI-202 make sure integration test don't interfere between each other
Repository: incubator-unomi Updated Branches: refs/heads/master dede058d6 -> d5c560f39 UNOMI-202 make sure integration test don't interfere between each other Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/d5c560f3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/d5c560f3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/d5c560f3 Branch: refs/heads/master Commit: d5c560f39518563c72c83ac34a1e517497dc18a4 Parents: dede058 Author: dgaillard Authored: Fri Oct 19 15:52:54 2018 +0200 Committer: dgaillard Committed: Fri Oct 19 15:52:54 2018 +0200 -- .../java/org/apache/unomi/itests/PatchIT.java | 23 +--- itests/src/test/resources/patch1.json | 4 ++-- itests/src/test/resources/patch3.json | 2 +- 3 files changed, 13 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5c560f3/itests/src/test/java/org/apache/unomi/itests/PatchIT.java -- diff --git a/itests/src/test/java/org/apache/unomi/itests/PatchIT.java b/itests/src/test/java/org/apache/unomi/itests/PatchIT.java index 8ed71b8..8016693 100644 --- a/itests/src/test/java/org/apache/unomi/itests/PatchIT.java +++ b/itests/src/test/java/org/apache/unomi/itests/PatchIT.java @@ -54,23 +54,21 @@ public class PatchIT extends BaseIT { @Test public void testPatch() throws IOException, InterruptedException { -PropertyType firstName = profileService.getPropertyType("firstName"); +PropertyType company = profileService.getPropertyType("company"); try { Patch patch = CustomObjectMapper.getObjectMapper().readValue(bundleContext.getBundle().getResource("patch1.json"), Patch.class); -PropertyType newFirstName = (PropertyType) patchService.patch(patch); +PropertyType newCompany = (PropertyType) patchService.patch(patch); -Assert.assertEquals("foo", newFirstName.getDefaultValue()); +Assert.assertEquals("foo", newCompany.getDefaultValue()); Thread.sleep(1); -newFirstName = profileService.getPropertyType("firstName"); -Assert.assertEquals("foo", newFirstName.getDefaultValue()); +newCompany = profileService.getPropertyType("company"); +Assert.assertEquals("foo", newCompany.getDefaultValue()); } finally { -profileService.setPropertyType(firstName); +profileService.setPropertyType(company); } - - } @Test @@ -90,12 +88,11 @@ public class PatchIT extends BaseIT { } finally { profileService.setPropertyType(gender); } - } @Test public void testRemove() throws IOException, InterruptedException { -PropertyType firstName = profileService.getPropertyType("income"); +PropertyType income = profileService.getPropertyType("income"); try { Patch patch = CustomObjectMapper.getObjectMapper().readValue(bundleContext.getBundle().getResource("patch3.json"), Patch.class); @@ -104,10 +101,10 @@ public class PatchIT extends BaseIT { Thread.sleep(1); -PropertyType newFirstName = profileService.getPropertyType("income"); -Assert.assertNull(newFirstName); +PropertyType newIncome = profileService.getPropertyType("income"); +Assert.assertNull(newIncome); } finally { -profileService.setPropertyType(firstName); +profileService.setPropertyType(income); } } } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5c560f3/itests/src/test/resources/patch1.json -- diff --git a/itests/src/test/resources/patch1.json b/itests/src/test/resources/patch1.json index bf7f672..acb6b76 100644 --- a/itests/src/test/resources/patch1.json +++ b/itests/src/test/resources/patch1.json @@ -1,6 +1,6 @@ { - "itemId": "firstName-patch1", - "patchedItemId": "firstName", + "itemId": "company-patch1", + "patchedItemId": "company", "patchedItemType": "propertyType", "operation": "patch", "data": [ http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5c560f3/itests/src/test/resources/patch3.json -- diff --git a/itests/src/test/resources/patch3.json b/itests
incubator-unomi git commit: UNOMI-202 fix issue with scheduler, add missing parameters to setup the scheduler
Repository: incubator-unomi Updated Branches: refs/heads/master 9b29b848e -> dede058d6 UNOMI-202 fix issue with scheduler, add missing parameters to setup the scheduler Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/dede058d Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/dede058d Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/dede058d Branch: refs/heads/master Commit: dede058d6eee431f940e7008c31a389c30cac084 Parents: 9b29b84 Author: dgaillard Authored: Fri Oct 19 15:52:04 2018 +0200 Committer: dgaillard Committed: Fri Oct 19 15:52:04 2018 +0200 -- .../unomi/geonames/services/GeonamesServiceImpl.java | 13 + .../main/resources/OSGI-INF/blueprint/blueprint.xml | 5 +++-- .../src/main/resources/org.apache.unomi.geonames.cfg | 5 - .../unomi/services/services/ClusterServiceImpl.java | 2 +- .../unomi/services/services/RulesServiceImpl.java| 15 +-- .../main/resources/OSGI-INF/blueprint/blueprint.xml | 4 .../src/main/resources/org.apache.unomi.services.cfg | 6 ++ 7 files changed, 40 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dede058d/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java -- diff --git a/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java b/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java index 44695b5..2645281 100644 --- a/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java +++ b/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java @@ -46,6 +46,7 @@ public class GeonamesServiceImpl implements GeonamesService { private String pathToGeonamesDatabase; private Boolean forceDbImport; +private Integer refreshDbInterval = 5000; public void setForceDbImport(Boolean forceDbImport) { this.forceDbImport = forceDbImport; @@ -67,6 +68,10 @@ public class GeonamesServiceImpl implements GeonamesService { this.pathToGeonamesDatabase = pathToGeonamesDatabase; } +public void setRefreshDbInterval(Integer refreshDbInterval) { +this.refreshDbInterval = refreshDbInterval; +} + public void start() { importDatabase(); } @@ -93,12 +98,12 @@ public class GeonamesServiceImpl implements GeonamesService { } final File f = new File(pathToGeonamesDatabase); if (f.exists()) { -schedulerService.getScheduleExecutorService().schedule(new TimerTask() { + schedulerService.getScheduleExecutorService().scheduleWithFixedDelay(new TimerTask() { @Override public void run() { importGeoNameDatabase(f); } -}, 5000, TimeUnit.MILLISECONDS); +}, 0, refreshDbInterval, TimeUnit.MILLISECONDS); } } @@ -106,12 +111,12 @@ public class GeonamesServiceImpl implements GeonamesService { Map> typeMappings = persistenceService.getPropertiesMapping(GeonameEntry.ITEM_TYPE); if (typeMappings == null || typeMappings.size() == 0) { logger.warn("Type mappings for type {} are not yet installed, delaying import until they are ready!", GeonameEntry.ITEM_TYPE); -schedulerService.getScheduleExecutorService().schedule(new TimerTask() { + schedulerService.getScheduleExecutorService().scheduleWithFixedDelay(new TimerTask() { @Override public void run() { importGeoNameDatabase(f); } -}, 5000, TimeUnit.MILLISECONDS); +}, 0, refreshDbInterval, TimeUnit.MILLISECONDS); return; } else { // let's check that the mappings are correct http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/dede058d/extensions/geonames/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml -- diff --git a/extensions/geonames/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/extensions/geonames/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml index 05d11e7..01a1a80 100644 --- a/extensions/geonames/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ b/extensions/geonames/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml @@ -21,11 +21,11 @@ xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
incubator-unomi git commit: UNOMI-202 fix IT test
Repository: incubator-unomi Updated Branches: refs/heads/master 07082161c -> 9b29b848e UNOMI-202 fix IT test Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/9b29b848 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/9b29b848 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/9b29b848 Branch: refs/heads/master Commit: 9b29b848e69d26f5d58686b38c66f0a1af38b10f Parents: 0708216 Author: dgaillard Authored: Fri Oct 19 12:22:05 2018 +0200 Committer: dgaillard Committed: Fri Oct 19 12:22:05 2018 +0200 -- itests/src/test/java/org/apache/unomi/itests/PatchIT.java | 4 ++-- itests/src/test/resources/patch3.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/9b29b848/itests/src/test/java/org/apache/unomi/itests/PatchIT.java -- diff --git a/itests/src/test/java/org/apache/unomi/itests/PatchIT.java b/itests/src/test/java/org/apache/unomi/itests/PatchIT.java index 20c8e0d..8ed71b8 100644 --- a/itests/src/test/java/org/apache/unomi/itests/PatchIT.java +++ b/itests/src/test/java/org/apache/unomi/itests/PatchIT.java @@ -95,7 +95,7 @@ public class PatchIT extends BaseIT { @Test public void testRemove() throws IOException, InterruptedException { -PropertyType firstName = profileService.getPropertyType("firstName"); +PropertyType firstName = profileService.getPropertyType("income"); try { Patch patch = CustomObjectMapper.getObjectMapper().readValue(bundleContext.getBundle().getResource("patch3.json"), Patch.class); @@ -104,7 +104,7 @@ public class PatchIT extends BaseIT { Thread.sleep(1); -PropertyType newFirstName = profileService.getPropertyType("firstName"); +PropertyType newFirstName = profileService.getPropertyType("income"); Assert.assertNull(newFirstName); } finally { profileService.setPropertyType(firstName); http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/9b29b848/itests/src/test/resources/patch3.json -- diff --git a/itests/src/test/resources/patch3.json b/itests/src/test/resources/patch3.json index 9bb546b..e2d25fb 100644 --- a/itests/src/test/resources/patch3.json +++ b/itests/src/test/resources/patch3.json @@ -1,6 +1,6 @@ { - "itemId": "firstName-patch2", - "patchedItemId": "firstName", + "itemId": "income-patch2", + "patchedItemId": "income", "patchedItemType": "propertyType", "operation": "remove" }
incubator-unomi git commit: UNOMI-202 update javadoc
Repository: incubator-unomi Updated Branches: refs/heads/master 3bb183f75 -> 07082161c UNOMI-202 update javadoc Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/07082161 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/07082161 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/07082161 Branch: refs/heads/master Commit: 07082161c9f3f85976a6a5bde7038e1d7695e3a0 Parents: 3bb183f Author: dgaillard Authored: Fri Oct 19 12:09:10 2018 +0200 Committer: dgaillard Committed: Fri Oct 19 12:09:10 2018 +0200 -- .../main/java/org/apache/unomi/api/services/SchedulerService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/07082161/api/src/main/java/org/apache/unomi/api/services/SchedulerService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/SchedulerService.java b/api/src/main/java/org/apache/unomi/api/services/SchedulerService.java index e9d6900..e9182c0 100644 --- a/api/src/main/java/org/apache/unomi/api/services/SchedulerService.java +++ b/api/src/main/java/org/apache/unomi/api/services/SchedulerService.java @@ -20,8 +20,7 @@ package org.apache.unomi.api.services; import java.util.concurrent.ScheduledExecutorService; /** - * A service to access {@link ScheduledExecutorService} to execute {@link java.util.TimerTask} - * Use this service instead of creating and using a new {@link java.util.Timer} + * A service to centralize scheduling of tasks instead of using Timers or executors in each service * * https://stackoverflow.com/questions/409932/java-timer-vs-executorservice */
incubator-unomi git commit: UNOMI-202 add javadoc
Repository: incubator-unomi Updated Branches: refs/heads/master 12f0cabcb -> 3bb183f75 UNOMI-202 add javadoc Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/3bb183f7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/3bb183f7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/3bb183f7 Branch: refs/heads/master Commit: 3bb183f75bca928a7db7c18aafd2e4ef3089e4ac Parents: 12f0cab Author: dgaillard Authored: Fri Oct 19 12:02:39 2018 +0200 Committer: dgaillard Committed: Fri Oct 19 12:02:39 2018 +0200 -- .../org/apache/unomi/api/services/SchedulerService.java | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/3bb183f7/api/src/main/java/org/apache/unomi/api/services/SchedulerService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/SchedulerService.java b/api/src/main/java/org/apache/unomi/api/services/SchedulerService.java index ddf2cd2..e9d6900 100644 --- a/api/src/main/java/org/apache/unomi/api/services/SchedulerService.java +++ b/api/src/main/java/org/apache/unomi/api/services/SchedulerService.java @@ -20,8 +20,18 @@ package org.apache.unomi.api.services; import java.util.concurrent.ScheduledExecutorService; /** - * @author dgaillard + * A service to access {@link ScheduledExecutorService} to execute {@link java.util.TimerTask} + * Use this service instead of creating and using a new {@link java.util.Timer} + * + * https://stackoverflow.com/questions/409932/java-timer-vs-executorservice */ public interface SchedulerService { + +/** + * Use this method to get a {@link ScheduledExecutorService} + * and execute your task with it instead of using {@link java.util.Timer} + * + * @return {@link ScheduledExecutorService} + */ ScheduledExecutorService getScheduleExecutorService(); }
[1/2] incubator-unomi git commit: UNOMI-202 make sure condition types and action types maps are reloaded, replace Timer by ScheduledThreadExecutor to improve Task handling
Repository: incubator-unomi Updated Branches: refs/heads/master aa82e46a0 -> 12f0cabcb UNOMI-202 make sure condition types and action types maps are reloaded, replace Timer by ScheduledThreadExecutor to improve Task handling Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/04dd4fde Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/04dd4fde Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/04dd4fde Branch: refs/heads/master Commit: 04dd4fde8691a6921dee82325e9321a5406adaca Parents: aa82e46 Author: dgaillard Authored: Thu Oct 18 19:35:03 2018 +0200 Committer: dgaillard Committed: Thu Oct 18 19:44:54 2018 +0200 -- .../apache/unomi/api/conditions/Condition.java | 1 + .../unomi/api/services/SchedulerService.java| 27 + .../geonames/services/GeonamesServiceImpl.java | 22 --- .../resources/OSGI-INF/blueprint/blueprint.xml | 6 +- .../services/services/ClusterServiceImpl.java | 11 +++- .../services/DefinitionsServiceImpl.java| 50 .../services/services/ProfileServiceImpl.java | 45 +-- .../services/services/RulesServiceImpl.java | 30 -- .../services/services/SchedulerServiceImpl.java | 48 +++ .../services/services/SegmentServiceImpl.java | 61 +--- .../resources/OSGI-INF/blueprint/blueprint.xml | 22 ++- .../resources/org.apache.unomi.services.cfg | 12 12 files changed, 235 insertions(+), 100 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/04dd4fde/api/src/main/java/org/apache/unomi/api/conditions/Condition.java -- diff --git a/api/src/main/java/org/apache/unomi/api/conditions/Condition.java b/api/src/main/java/org/apache/unomi/api/conditions/Condition.java index 541ef4b..6627800 100644 --- a/api/src/main/java/org/apache/unomi/api/conditions/Condition.java +++ b/api/src/main/java/org/apache/unomi/api/conditions/Condition.java @@ -27,6 +27,7 @@ import java.util.Map; * A set of elements that can be evaluated. */ public class Condition implements Serializable { +private static final long serialVersionUID = 7584522402785053206L; ConditionType conditionType; String conditionTypeId; http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/04dd4fde/api/src/main/java/org/apache/unomi/api/services/SchedulerService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/SchedulerService.java b/api/src/main/java/org/apache/unomi/api/services/SchedulerService.java new file mode 100644 index 000..ddf2cd2 --- /dev/null +++ b/api/src/main/java/org/apache/unomi/api/services/SchedulerService.java @@ -0,0 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.unomi.api.services; + +import java.util.concurrent.ScheduledExecutorService; + +/** + * @author dgaillard + */ +public interface SchedulerService { +ScheduledExecutorService getScheduleExecutorService(); +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/04dd4fde/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java -- diff --git a/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java b/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java index 8817836..44695b5 100644 --- a/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java +++ b/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java @@ -22,6 +22,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.unomi.api.PartialList; import org.apache.unomi.api.condit
[2/2] incubator-unomi git commit: UNOMI-202 add sort to patches to execute patch in filename order
UNOMI-202 add sort to patches to execute patch in filename order Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/12f0cabc Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/12f0cabc Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/12f0cabc Branch: refs/heads/master Commit: 12f0cabcb12979fb9c1a8fe5e879bab3a6b0b02d Parents: 04dd4fd Author: dgaillard Authored: Thu Oct 18 20:01:10 2018 +0200 Committer: dgaillard Committed: Thu Oct 18 20:01:10 2018 +0200 -- .../unomi/services/services/PatchServiceImpl.java | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/12f0cabc/services/src/main/java/org/apache/unomi/services/services/PatchServiceImpl.java -- diff --git a/services/src/main/java/org/apache/unomi/services/services/PatchServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/PatchServiceImpl.java index 0ee58e0..7f6e36e 100644 --- a/services/src/main/java/org/apache/unomi/services/services/PatchServiceImpl.java +++ b/services/src/main/java/org/apache/unomi/services/services/PatchServiceImpl.java @@ -32,8 +32,7 @@ import org.slf4j.LoggerFactory; import java.io.IOException; import java.net.URL; -import java.util.Date; -import java.util.Enumeration; +import java.util.*; public class PatchServiceImpl implements PatchService, SynchronousBundleListener { @@ -93,8 +92,14 @@ public class PatchServiceImpl implements PatchService, SynchronousBundleListener // First apply patches on existing items Enumeration urls = bundleContext.getBundle().findEntries("META-INF/cxs/patches", "*.json", true); if (urls != null) { -while (urls.hasMoreElements()) { -URL patchUrl = urls.nextElement(); +List resources = Collections.list(urls); +resources.sort(new Comparator() { +@Override public int compare(URL o1, URL o2) { +return o1.getFile().compareTo(o2.getFile()); +} +}); + +for (URL patchUrl : resources) { try { Patch patch = CustomObjectMapper.getObjectMapper().readValue(patchUrl, Patch.class); if (persistenceService.load(patch.getItemId(), Patch.class) == null) {
incubator-unomi git commit: UNOMI-202 add missing serial version UUID
Repository: incubator-unomi Updated Branches: refs/heads/master 3228d8476 -> 55bd603ca UNOMI-202 add missing serial version UUID Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/55bd603c Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/55bd603c Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/55bd603c Branch: refs/heads/master Commit: 55bd603caee57f0a70f8f910c05fa042d4c3aa88 Parents: 3228d84 Author: dgaillard Authored: Wed Oct 17 18:50:23 2018 +0200 Committer: dgaillard Committed: Wed Oct 17 18:50:23 2018 +0200 -- api/src/main/java/org/apache/unomi/api/Patch.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/55bd603c/api/src/main/java/org/apache/unomi/api/Patch.java -- diff --git a/api/src/main/java/org/apache/unomi/api/Patch.java b/api/src/main/java/org/apache/unomi/api/Patch.java index 8dbf018..b7fb457 100644 --- a/api/src/main/java/org/apache/unomi/api/Patch.java +++ b/api/src/main/java/org/apache/unomi/api/Patch.java @@ -30,6 +30,7 @@ import java.util.Map; import java.util.TreeMap; public class Patch extends Item { +private static final long serialVersionUID = 4171966405850833985L; public final static Map> PATCHABLE_TYPES;
incubator-unomi git commit: UNOMI-202 code review: improve documentation
Repository: incubator-unomi Updated Branches: refs/heads/master 83ff7ad6c -> 3228d8476 UNOMI-202 code review: improve documentation Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/3228d847 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/3228d847 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/3228d847 Branch: refs/heads/master Commit: 3228d84769fdb4282de713e4de85646a83f1018e Parents: 83ff7ad Author: dgaillard Authored: Wed Oct 17 13:27:33 2018 +0200 Committer: dgaillard Committed: Wed Oct 17 13:27:33 2018 +0200 -- manual/src/main/asciidoc/custom-extensions.adoc | 17 + 1 file changed, 17 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/3228d847/manual/src/main/asciidoc/custom-extensions.adoc -- diff --git a/manual/src/main/asciidoc/custom-extensions.adoc b/manual/src/main/asciidoc/custom-extensions.adoc index 41c7102..0007815 100644 --- a/manual/src/main/asciidoc/custom-extensions.adoc +++ b/manual/src/main/asciidoc/custom-extensions.adoc @@ -434,6 +434,23 @@ Each patch must have a unique id - unomi will use this id to remember that the p A patch also need to reference the item to patch by setting `patchedItemId` and `patchedItemType`, and an operation that tells what the patch should do. + +.`patchedItemType` can take one of the following value: +- condition +- action +- goal +- campaign +- persona +- propertyType +- rule +- segment +- scoring + +.`operation` can take one of the following value: +- patch +- override +- remove + You can apply a patch in http://jsonpatch.com/[json-patch] format in the `data` field, and by specifying operation `patch` like in this example : [source]
incubator-unomi git commit: UNOMI-202 code review: clear unused reference to PatchService
Repository: incubator-unomi Updated Branches: refs/heads/master 95d003084 -> 83ff7ad6c UNOMI-202 code review: clear unused reference to PatchService Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/83ff7ad6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/83ff7ad6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/83ff7ad6 Branch: refs/heads/master Commit: 83ff7ad6cd0aade7b76927ff113d36fa7eed9762 Parents: 95d0030 Author: dgaillard Authored: Wed Oct 17 13:26:46 2018 +0200 Committer: dgaillard Committed: Wed Oct 17 13:26:46 2018 +0200 -- .../services/services/DefinitionsServiceImpl.java| 8 .../unomi/services/services/GoalsServiceImpl.java| 7 --- .../unomi/services/services/ProfileServiceImpl.java | 15 --- .../unomi/services/services/RulesServiceImpl.java| 6 -- .../unomi/services/services/SegmentServiceImpl.java | 7 --- .../main/resources/OSGI-INF/blueprint/blueprint.xml | 6 -- 6 files changed, 49 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/83ff7ad6/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java -- diff --git a/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java index a6c2e15..a29e8c9 100644 --- a/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java +++ b/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java @@ -17,7 +17,6 @@ package org.apache.unomi.services.services; -import org.apache.unomi.api.Persona; import org.apache.unomi.api.PluginType; import org.apache.unomi.api.PropertyMergeStrategyType; import org.apache.unomi.api.ValueType; @@ -25,10 +24,8 @@ import org.apache.unomi.api.actions.ActionType; import org.apache.unomi.api.conditions.Condition; import org.apache.unomi.api.conditions.ConditionType; import org.apache.unomi.api.services.DefinitionsService; -import org.apache.unomi.api.services.PatchService; import org.apache.unomi.persistence.spi.CustomObjectMapper; import org.apache.unomi.persistence.spi.PersistenceService; -import org.apache.unomi.persistence.spi.aggregate.BaseAggregate; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; import org.osgi.framework.BundleEvent; @@ -46,7 +43,6 @@ public class DefinitionsServiceImpl implements DefinitionsService, SynchronousBu private static final Logger logger = LoggerFactory.getLogger(DefinitionsServiceImpl.class.getName()); private PersistenceService persistenceService; -private PatchService patchService; private Map conditionTypeById = new ConcurrentHashMap<>(); private Map actionTypeById = new ConcurrentHashMap<>(); @@ -68,10 +64,6 @@ public class DefinitionsServiceImpl implements DefinitionsService, SynchronousBu this.persistenceService = persistenceService; } -public void setPatchService(PatchService patchService) { -this.patchService = patchService; -} - public void postConstruct() { logger.debug("postConstruct {" + bundleContext.getBundle() + "}"); http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/83ff7ad6/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java -- diff --git a/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java index f7d8ba7..e29983f 100644 --- a/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java +++ b/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java @@ -30,7 +30,6 @@ import org.apache.unomi.api.query.Query; import org.apache.unomi.api.rules.Rule; import org.apache.unomi.api.services.DefinitionsService; import org.apache.unomi.api.services.GoalsService; -import org.apache.unomi.api.services.PatchService; import org.apache.unomi.api.services.RulesService; import org.apache.unomi.persistence.spi.CustomObjectMapper; import org.apache.unomi.persistence.spi.PersistenceService; @@ -58,8 +57,6 @@ public class GoalsServiceImpl implements GoalsService, SynchronousBundleListener private RulesService rulesService; -private PatchService patchService; - public void setBundleContext(BundleContext bundleContext) { this.bundleContext = bundleContext; } @@ -76,10 +73,6 @@ public class GoalsServiceImpl implements Goals
[1/2] incubator-unomi git commit: Revert "add missing files"
Repository: incubator-unomi Updated Branches: refs/heads/master 329af539e -> 32608bc47 Revert "add missing files" This reverts commit 329af539e8c106d1f51f09e086c874339f90a1c9. Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/efb8f68d Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/efb8f68d Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/efb8f68d Branch: refs/heads/master Commit: efb8f68d83db4c88c2296dd5cf93a050e5738977 Parents: 329af53 Author: dgaillard Authored: Mon Oct 8 17:53:44 2018 +0200 Committer: dgaillard Committed: Mon Oct 8 17:53:44 2018 +0200 -- extensions/pom.xml | 1 - extensions/twilio/README.md | 26 ++--- extensions/twilio/core/pom.xml | 56 ++-- .../unomi/twilio/actions/TwilioCallAction.java | 2 +- .../META-INF/cxs/actions/twilioCall.json| 2 +- .../META-INF/cxs/rules/callVisitorTwilio.json | 4 +- .../resources/OSGI-INF/blueprint/blueprint.xml | 19 +++ extensions/twilio/karaf-kar/pom.xml | 17 -- .../karaf-kar/src/main/feature/feature.xml | 15 +++--- extensions/twilio/pom.xml | 8 +-- .../analytics.js-integration-apache-unomi.js| 4 +- .../web-tracker/wab/src/main/webapp/voice.xml | 16 -- 12 files changed, 79 insertions(+), 91 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/efb8f68d/extensions/pom.xml -- diff --git a/extensions/pom.xml b/extensions/pom.xml index 23a9455..975c28c 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -39,7 +39,6 @@ unomi-mailchimp weather-update web-tracker -twilio http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/efb8f68d/extensions/twilio/README.md -- diff --git a/extensions/twilio/README.md b/extensions/twilio/README.md index 9e4befc..8ade7ee 100644 --- a/extensions/twilio/README.md +++ b/extensions/twilio/README.md @@ -16,14 +16,28 @@ --> -Apache Unomi Twilio Integration +Apache Unomi Web Tracker = -``` -feature:repo-add mvn:org.apache.unomi/unomi-twilio-karaf-kar/1.4.0-incubating-SNAPSHOT/xml/features +This extension is providing the web tracker to start collecting visitors data on your website. +The tracker is implemented as an integration of [analytics.js](https://github.com/segmentio/analytics.js) for Unomi. + +## Getting started + +Extension can be tested at : `http://localhost:8181/tracker/index.html` -feature:repo-add mvn:org.apache.unomi/unomi-twilio-karaf-kar/${project.version}/xml/features -feature:install unomi-twilio-karaf-kar +In your page include unomiOptions and include code snippet from `snippet.min.js` : -feature:uninstall unomi-twilio-karaf-kar +```html + +var unomiOption = { +scope: 'realEstateManager', +url: '<a rel="nofollow" href="http://localhost:8181">http://localhost:8181</a>' +}; +window.unomiTracker||(window.unomiTracker={}),function(){for(var e=[],r=["trackSubmit","trackClick","trackLink","trackForm","initialize","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"],n=0;n<r.length;n++){var t=r[n];window.unomiTracker[t]=function(r){return function(){var n=Array.prototype.slice.call(arguments);return n.unshift(r),e.push(n),window.unomiTracker}}(t)}unomiTracker.load=function(e,r){var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=r.url+"/tracker/javascript/unomi-tracker.js",n.addEventListener?n.addEventListener("load",function(r){"function"==typeof e&&e(r)},!1):n.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||e(window.event)};var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(n,t)},unomiTracker.load(function(r){for(unomiTracker.initialize({"Apache Unomi":r});e.length>0;){var n=e.shift(),t=n.shift();unomiTracker[t]&&unom iTracker[t].apply(unomiTracker,n)}},unomiOption),unomiTracker.page()}(); + ``` + +`window.unomiTracker` can be used to send additional events when needed. + +Check analytics.js API [here](https://segment.com/docs/sources/website/analytics.js/). All methods can
[2/2] incubator-unomi git commit: Revert "commit poc"
Revert "commit poc" This reverts commit 1403a9a44cc5a548a216bab98586f66d11cc8360. Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/32608bc4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/32608bc4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/32608bc4 Branch: refs/heads/master Commit: 32608bc47ecf1fb32057ec8406debb4cb27fb365 Parents: efb8f68 Author: dgaillard Authored: Mon Oct 8 17:53:57 2018 +0200 Committer: dgaillard Committed: Mon Oct 8 17:53:57 2018 +0200 -- extensions/twilio/README.md | 43 - extensions/twilio/core/.gitignore | 3 - extensions/twilio/core/pom.xml | 81 - .../unomi/twilio/actions/TwilioCallAction.java | 91 .../META-INF/cxs/actions/twilioCall.json| 21 - .../META-INF/cxs/rules/callVisitorTwilio.json | 44 -- .../resources/OSGI-INF/blueprint/blueprint.xml | 44 -- .../main/resources/org.apache.unomi.twilio.cfg | 25 -- extensions/twilio/karaf-kar/pom.xml | 79 - .../karaf-kar/src/main/feature/feature.xml | 28 -- extensions/twilio/pom.xml | 36 .../web-tracker/wab/src/main/webapp/voice.xml | 5 -- 12 files changed, 500 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/32608bc4/extensions/twilio/README.md -- diff --git a/extensions/twilio/README.md b/extensions/twilio/README.md deleted file mode 100644 index 8ade7ee..000 --- a/extensions/twilio/README.md +++ /dev/null @@ -1,43 +0,0 @@ - - - -Apache Unomi Web Tracker -= - -This extension is providing the web tracker to start collecting visitors data on your website. -The tracker is implemented as an integration of [analytics.js](https://github.com/segmentio/analytics.js) for Unomi. - -## Getting started - -Extension can be tested at : `http://localhost:8181/tracker/index.html` - -In your page include unomiOptions and include code snippet from `snippet.min.js` : - -```html - -var unomiOption = { -scope: 'realEstateManager', -url: '<a rel="nofollow" href="http://localhost:8181">http://localhost:8181</a>' -}; -window.unomiTracker||(window.unomiTracker={}),function(){for(var e=[],r=["trackSubmit","trackClick","trackLink","trackForm","initialize","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"],n=0;n<r.length;n++){var t=r[n];window.unomiTracker[t]=function(r){return function(){var n=Array.prototype.slice.call(arguments);return n.unshift(r),e.push(n),window.unomiTracker}}(t)}unomiTracker.load=function(e,r){var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=r.url+"/tracker/javascript/unomi-tracker.js",n.addEventListener?n.addEventListener("load",function(r){"function"==typeof e&&e(r)},!1):n.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||e(window.event)};var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(n,t)},unomiTracker.load(function(r){for(unomiTracker.initialize({"Apache Unomi":r});e.length>0;){var n=e.shift(),t=n.shift();unomiTracker[t]&&unom iTracker[t].apply(unomiTracker,n)}},unomiOption),unomiTracker.page()}(); - -``` - -`window.unomiTracker` can be used to send additional events when needed. - -Check analytics.js API [here](https://segment.com/docs/sources/website/analytics.js/). All methods can be used on `unomiTracker` object, although not all event types are supported by Unomi intergation. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/32608bc4/extensions/twilio/core/.gitignore -- diff --git a/extensions/twilio/core/.gitignore b/extensions/twilio/core/.gitignore deleted file mode 100644 index 6ade2e9..000 --- a/extensions/twilio/core/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -yarn-error.log -src/main/webapp/dist \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/32608bc4/extensions/twilio/core/pom.xml -- diff --git a/extensions/twilio/core/pom.xml b/ex
incubator-unomi git commit: add missing files
Repository: incubator-unomi Updated Branches: refs/heads/master 1403a9a44 -> 329af539e add missing files Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/329af539 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/329af539 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/329af539 Branch: refs/heads/master Commit: 329af539e8c106d1f51f09e086c874339f90a1c9 Parents: 1403a9a Author: dgaillard Authored: Mon Oct 8 17:52:37 2018 +0200 Committer: dgaillard Committed: Mon Oct 8 17:52:37 2018 +0200 -- extensions/pom.xml | 1 + extensions/twilio/README.md | 26 +++-- extensions/twilio/core/pom.xml | 56 ++-- .../unomi/twilio/actions/TwilioCallAction.java | 2 +- .../META-INF/cxs/actions/twilioCall.json| 2 +- .../META-INF/cxs/rules/callVisitorTwilio.json | 4 +- .../resources/OSGI-INF/blueprint/blueprint.xml | 19 --- extensions/twilio/karaf-kar/pom.xml | 17 ++ .../karaf-kar/src/main/feature/feature.xml | 15 +++--- extensions/twilio/pom.xml | 8 +-- .../analytics.js-integration-apache-unomi.js| 4 +- .../web-tracker/wab/src/main/webapp/voice.xml | 16 ++ 12 files changed, 91 insertions(+), 79 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/329af539/extensions/pom.xml -- diff --git a/extensions/pom.xml b/extensions/pom.xml index 975c28c..23a9455 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -39,6 +39,7 @@ unomi-mailchimp weather-update web-tracker +twilio http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/329af539/extensions/twilio/README.md -- diff --git a/extensions/twilio/README.md b/extensions/twilio/README.md index 8ade7ee..9e4befc 100644 --- a/extensions/twilio/README.md +++ b/extensions/twilio/README.md @@ -16,28 +16,14 @@ --> -Apache Unomi Web Tracker +Apache Unomi Twilio Integration = -This extension is providing the web tracker to start collecting visitors data on your website. -The tracker is implemented as an integration of [analytics.js](https://github.com/segmentio/analytics.js) for Unomi. - -## Getting started - -Extension can be tested at : `http://localhost:8181/tracker/index.html` - -In your page include unomiOptions and include code snippet from `snippet.min.js` : - -```html - -var unomiOption = { -scope: 'realEstateManager', -url: '<a rel="nofollow" href="http://localhost:8181">http://localhost:8181</a>' -}; -window.unomiTracker||(window.unomiTracker={}),function(){for(var e=[],r=["trackSubmit","trackClick","trackLink","trackForm","initialize","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"],n=0;n<r.length;n++){var t=r[n];window.unomiTracker[t]=function(r){return function(){var n=Array.prototype.slice.call(arguments);return n.unshift(r),e.push(n),window.unomiTracker}}(t)}unomiTracker.load=function(e,r){var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=r.url+"/tracker/javascript/unomi-tracker.js",n.addEventListener?n.addEventListener("load",function(r){"function"==typeof e&&e(r)},!1):n.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||e(window.event)};var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(n,t)},unomiTracker.load(function(r){for(unomiTracker.initialize({"Apache Unomi":r});e.length>0;){var n=e.shift(),t=n.shift();unomiTracker[t]&&unom iTracker[t].apply(unomiTracker,n)}},unomiOption),unomiTracker.page()}(); - ``` +feature:repo-add mvn:org.apache.unomi/unomi-twilio-karaf-kar/1.4.0-incubating-SNAPSHOT/xml/features -`window.unomiTracker` can be used to send additional events when needed. +feature:repo-add mvn:org.apache.unomi/unomi-twilio-karaf-kar/${project.version}/xml/features +feature:install unomi-twilio-karaf-kar -Check analytics.js API [here](https://segment.com/docs/sources/website/analytics.js/). All methods can be used on `unomiTracker` object, although not all event types are supported by Unomi intergation. \ No newline at end of
incubator-unomi git commit: commit poc
Repository: incubator-unomi Updated Branches: refs/heads/master 2b838a672 -> 1403a9a44 commit poc Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/1403a9a4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/1403a9a4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/1403a9a4 Branch: refs/heads/master Commit: 1403a9a44cc5a548a216bab98586f66d11cc8360 Parents: 2b838a6 Author: dgaillard Authored: Mon Oct 8 17:51:49 2018 +0200 Committer: dgaillard Committed: Mon Oct 8 17:51:49 2018 +0200 -- extensions/twilio/README.md | 43 + extensions/twilio/core/.gitignore | 3 + extensions/twilio/core/pom.xml | 81 + .../unomi/twilio/actions/TwilioCallAction.java | 91 .../META-INF/cxs/actions/twilioCall.json| 21 + .../META-INF/cxs/rules/callVisitorTwilio.json | 44 ++ .../resources/OSGI-INF/blueprint/blueprint.xml | 44 ++ .../main/resources/org.apache.unomi.twilio.cfg | 25 ++ extensions/twilio/karaf-kar/pom.xml | 79 + .../karaf-kar/src/main/feature/feature.xml | 28 ++ extensions/twilio/pom.xml | 36 .../web-tracker/wab/src/main/webapp/voice.xml | 5 ++ 12 files changed, 500 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1403a9a4/extensions/twilio/README.md -- diff --git a/extensions/twilio/README.md b/extensions/twilio/README.md new file mode 100644 index 000..8ade7ee --- /dev/null +++ b/extensions/twilio/README.md @@ -0,0 +1,43 @@ + + + +Apache Unomi Web Tracker += + +This extension is providing the web tracker to start collecting visitors data on your website. +The tracker is implemented as an integration of [analytics.js](https://github.com/segmentio/analytics.js) for Unomi. + +## Getting started + +Extension can be tested at : `http://localhost:8181/tracker/index.html` + +In your page include unomiOptions and include code snippet from `snippet.min.js` : + +```html + +var unomiOption = { +scope: 'realEstateManager', +url: '<a rel="nofollow" href="http://localhost:8181">http://localhost:8181</a>' +}; +window.unomiTracker||(window.unomiTracker={}),function(){for(var e=[],r=["trackSubmit","trackClick","trackLink","trackForm","initialize","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"],n=0;n<r.length;n++){var t=r[n];window.unomiTracker[t]=function(r){return function(){var n=Array.prototype.slice.call(arguments);return n.unshift(r),e.push(n),window.unomiTracker}}(t)}unomiTracker.load=function(e,r){var n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=r.url+"/tracker/javascript/unomi-tracker.js",n.addEventListener?n.addEventListener("load",function(r){"function"==typeof e&&e(r)},!1):n.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||e(window.event)};var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(n,t)},unomiTracker.load(function(r){for(unomiTracker.initialize({"Apache Unomi":r});e.length>0;){var n=e.shift(),t=n.shift();unomiTracker[t]&&unom iTracker[t].apply(unomiTracker,n)}},unomiOption),unomiTracker.page()}(); + +``` + +`window.unomiTracker` can be used to send additional events when needed. + +Check analytics.js API [here](https://segment.com/docs/sources/website/analytics.js/). All methods can be used on `unomiTracker` object, although not all event types are supported by Unomi intergation. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1403a9a4/extensions/twilio/core/.gitignore -- diff --git a/extensions/twilio/core/.gitignore b/extensions/twilio/core/.gitignore new file mode 100644 index 000..6ade2e9 --- /dev/null +++ b/extensions/twilio/core/.gitignore @@ -0,0 +1,3 @@ +node_modules +yarn-error.log +src/main/webapp/dist \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/1403a9a4/extensions/twilio/core/pom.xml -- diff --git a/extensions/twilio/core/pom.xml b/e
incubator-unomi git commit: UNOMI-187 fix snippet in README.md
Repository: incubator-unomi Updated Branches: refs/heads/master eb2cc83d2 -> c973d30aa UNOMI-187 fix snippet in README.md Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/c973d30a Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/c973d30a Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/c973d30a Branch: refs/heads/master Commit: c973d30aaa246b14f4671b974fb47eacabeb8b16 Parents: eb2cc83 Author: dgaillard Authored: Mon Oct 1 18:41:13 2018 +0200 Committer: dgaillard Committed: Mon Oct 1 18:41:13 2018 +0200 -- extensions/web-tracker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c973d30a/extensions/web-tracker/README.md -- diff --git a/extensions/web-tracker/README.md b/extensions/web-tracker/README.md index 8ade7ee..6e23de1 100644 --- a/extensions/web-tracker/README.md +++ b/extensions/web-tracker/README.md @@ -34,7 +34,7 @@ In your page include unomiOptions and include code snippet from `snippet.min.js` scope: 'realEstateManager', url: 'http://localhost:8181' }; -window.unomiTracker||(window.unomiTracker={}),function(){for(var e=[],r=["trackSubmit","trackClick","trackLink","trackForm","initialize","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"],n=0;n0;){var n=e.shift(),t=n.shift();unomiTracker[t]&&unom iTracker[t].apply(unomiTracker,n)}},unomiOption),unomiTracker.page()}(); +window.unomiTracker||(window.unomiTracker={}),function(){function e(e){for(unomiTracker.initialize({"Apache Unomi":unomiOption});n.length>0;){var r=n.shift(),t=r.shift();unomiTracker[t]&&unomiTracker[t].apply(unomiTracker,r)}}for(var n=[],r=["trackSubmit","trackClick","trackLink","trackForm","initialize","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","personalize"],t=0;t ```
[2/2] incubator-unomi git commit: UNOMI-187 remove comment
UNOMI-187 remove comment Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/eb2cc83d Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/eb2cc83d Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/eb2cc83d Branch: refs/heads/master Commit: eb2cc83d25d064a9334e1826c6475cc227cd7e10 Parents: 4b8c599 Author: dgaillard Authored: Fri Sep 28 16:14:31 2018 +0200 Committer: dgaillard Committed: Fri Sep 28 16:14:31 2018 +0200 -- extensions/web-tracker/karaf-kar/src/main/feature/feature.xml | 2 -- 1 file changed, 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/eb2cc83d/extensions/web-tracker/karaf-kar/src/main/feature/feature.xml -- diff --git a/extensions/web-tracker/karaf-kar/src/main/feature/feature.xml b/extensions/web-tracker/karaf-kar/src/main/feature/feature.xml index cc72fd0..1efbb26 100644 --- a/extensions/web-tracker/karaf-kar/src/main/feature/feature.xml +++ b/extensions/web-tracker/karaf-kar/src/main/feature/feature.xml @@ -19,8 +19,6 @@ Apache Karaf feature for the Apache Unomi Context Server extension that provide the web tracker. - - mvn:org.apache.httpcomponents/httpcore-osgi/${httpcore-osgi.version} mvn:org.apache.httpcomponents/httpclient-osgi/${httpclient-osgi.version} mvn:org.apache.unomi/unomi-web-tracker-wab/${project.version}
[1/2] incubator-unomi git commit: fix version
Repository: incubator-unomi Updated Branches: refs/heads/master 10e694ed8 -> eb2cc83d2 fix version Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/4b8c599d Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/4b8c599d Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/4b8c599d Branch: refs/heads/master Commit: 4b8c599d705e922d2869c9e6df4490ebd1dd3db9 Parents: 10e694e Author: dgaillard Authored: Wed Sep 26 14:14:26 2018 +0200 Committer: dgaillard Committed: Wed Sep 26 14:14:26 2018 +0200 -- performance-tests/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/4b8c599d/performance-tests/pom.xml -- diff --git a/performance-tests/pom.xml b/performance-tests/pom.xml index e371a81..f5f7df8 100644 --- a/performance-tests/pom.xml +++ b/performance-tests/pom.xml @@ -20,7 +20,7 @@ org.apache.unomi unomi-root -1.3.0-incubating-SNAPSHOT +1.4.0-incubating-SNAPSHOT unomi-performance-tests Apache Unomi :: Performance Tests
incubator-unomi git commit: UNOMI-187 rename feature entry
Repository: incubator-unomi Updated Branches: refs/heads/master b15e6cc66 -> 10e694ed8 UNOMI-187 rename feature entry Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/10e694ed Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/10e694ed Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/10e694ed Branch: refs/heads/master Commit: 10e694ed851cfcb6a6e6f2861cdff0f2075552db Parents: b15e6cc Author: dgaillard Authored: Wed Sep 26 14:12:51 2018 +0200 Committer: dgaillard Committed: Wed Sep 26 14:12:51 2018 +0200 -- kar/src/main/feature/feature.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/10e694ed/kar/src/main/feature/feature.xml -- diff --git a/kar/src/main/feature/feature.xml b/kar/src/main/feature/feature.xml index 182cbb3..012ad0d 100644 --- a/kar/src/main/feature/feature.xml +++ b/kar/src/main/feature/feature.xml @@ -63,7 +63,7 @@ mvn:org.apache.unomi/unomi-plugins-optimization-test/${project.version} mvn:org.apache.unomi/cxs-lists-extension-actions/${project.version} mvn:org.apache.unomi/shell-dev-commands/${project.version} -mvn:org.apache.unomi/unomi-web-tracker-core/${project.version} +mvn:org.apache.unomi/unomi-web-tracker-wab/${project.version} mvn:org.apache.unomi/shell-commands/${project.version}
incubator-unomi git commit: add my gpg key
Repository: incubator-unomi Updated Branches: refs/heads/master 3e32a969d -> b15e6cc66 add my gpg key Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/b15e6cc6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/b15e6cc6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/b15e6cc6 Branch: refs/heads/master Commit: b15e6cc66552979ba06aa2832fba0ca11affce92 Parents: 3e32a96 Author: dgaillard Authored: Wed Sep 26 13:53:23 2018 +0200 Committer: dgaillard Committed: Wed Sep 26 13:53:23 2018 +0200 -- KEYS| 59 +++ pom.xml | 10 +- 2 files changed, 68 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b15e6cc6/KEYS -- diff --git a/KEYS b/KEYS index 3e47742..f186380 100644 --- a/KEYS +++ b/KEYS @@ -102,3 +102,62 @@ De85yo9XvadBg9OHT5TXk3JBunAsZicNte0+deOALvq4yvYkLVkwSCOkY0nP5cJO pc9yvM78hnDVnOUkITH5gpEV =fKcW -END PGP PUBLIC KEY BLOCK- +pub rsa4096 2018-09-26 [SC] + 312043309743E6AB2D0D788AAA52D8117C01FC5A +uid [ultimate] Damien GAILLARD (CODE SIGNING KEY) +sig 3AA52D8117C01FC5A 2018-09-26 Damien GAILLARD (CODE SIGNING KEY) +sub rsa4096 2018-09-26 [E] +sig AA52D8117C01FC5A 2018-09-26 Damien GAILLARD (CODE SIGNING KEY) + +-BEGIN PGP PUBLIC KEY BLOCK- + +mQINBFurVlYBEADka8+pC4QRP1K7IHPHwo4RCZGL2sdtFxaLEu8P20Bm2O0WxDPq +s2T/7PbV8BWaRSuOXiuP0gH8it5uRpFWJhXugt11D8C96RXT61gd0AZIwM2TGOkI +lotGZynCHh3gGipKNEE/Eh7TP54UJKe0faA7pc3Q+tMisizNnO6agT08kmyCebHl +YQX87P6q9lN+UQehEsGfCCmdjVe/lNRdIMHJ4/zjJFqPWCWhQYDLxMIXnp15D1dd +9l2QuVj3+lFH8V9JDLE7r0oRQGiHWxiKE2M1SPIF6qBb9k9e1QvQZVCiGrUgdEql +fjYnypFUb1hInmDqbkXW3o3RMAyOS8RTao1V5DKA6romGK3PdpkfUd3+T486zDwb +Sn1Cv8lSqT4NtL68QiItkefCaIMJoAhHQEgp84fgiZCDWvmu07t9CQ1UvEr8bzAX +3NdDSZ/E1ro0LCFryOe7k+FwUX87t8OMO1Ao75OFdCdY6FyXrquiZkWjAhlvs48K +itYcN0AhQVJTf/jjX91bRN32zg2yw/2aEt3IUGqtsymgSswQqGHLxA3SHBpj3CCQ +G9bprr0NQXLW4rl11seu7Osx4OdfO6zGdB1arbfedfJWtptPw4sORmUMu+YgV7Bi +X8hxqMoYgs4/4dx0c4iKAkc2e06jdfo5qvh9iltpqmlLzEMIZbVjtzvuiQARAQAB +tDlEYW1pZW4gR0FJTExBUkQgKENPREUgU0lHTklORyBLRVkpIDxkZ2FpbGxhcmRA +YXBhY2hlLm9yZz6JAk4EEwEIADgWIQQxIEMwl0Pmqy0NeIqqUtgRfAH8WgUCW6tW +VgIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRCqUtgRfAH8WvDiEADQyqZJ +RrIJ0uq74zjK4iMtjdQ3qH9r0VcNdh+ztqQdPqUGlwRNNVLVKm+4Dgjevv4HEi/q +yh6ywegJexQXnm5/WmsJa4XmTqxC6cp4A9IAQo1b5x2xljS+iRB5EeYu6dOffZaF +l6wzc5nVaxUxXr0dwZnbbIyhPNjHe1hGSUO41OpKuEw8nJ8wXn3+VWpml+RovQS3 +FfOP9UeJHAShCiHZpSbN+PQbMCrJvaBDpHwSz4w9HihwJ7RiWGZgYlOjt5JEgnt7 +PPHK+VTrp8s6/+9KxQrORRLkAts7GTwa9udi5zTNXaQWdbdeGt/CZmVbZVIwNu/C +iABdXIZOjSNTXCp1wXy6QULVZGYDgq12bqLNLY0yfS3B6T0GwXsnd10aiYn6unc6 +UdA8a+nlZlWwqA373DNrdzxu1wICLXt/vKzOk6pxjv4c3g/DsvVK18Uyx0+s0eYz +nwXciEiQXwqXYtS4SWRwfYanCbk18P+0/yhzPp+7DmmEyWR/E3IMCtnNEkCi2z3Y +WYwi9tAwkgo8pOME1q4DYAGHb0cbNRjGwyFb5YLbE/X8iAWS8R+MWeW96CVi8EkG +wPpYdLHkTOvTXUh0PNC0/Zs0D2TNcADJUFzuUsVqHm0L0zRI2lGqPHCpUDkBAi77 +e7raZDvA2X/qb5V+xF7etMZdTAAEQk0E6y8QvLkCDQRbq1ZWARAApPw7aspBN2Yd +XNFL6co4lu8ORudiT+wZowcKfbA8C94I8J/Hj1qBuVsgo2Kf0fohmL2aAWgfkPx3 +aaKSsmrY/1PwoeC9NAIpTurLsShPqkhZC0YjQs+RVjeC3XO0xmJIVtncNm3dI0of +9wTWHF2Hsi7v+7Xtu2KEqQ4mtOfWFZnG/PrxLvfOHc2nu0+087Az5jYUjg+kEYic +wH7TF+6EACXcbXmOEJ25RfZ0gVF8VuG3RusB9T5TzvXYpoTh3CjWZ+8lJD3lvmD1 +yGOtCd1YU4xMcgDIwt4hK68lvybGCCa8mvVRIZvIsb7jwEw/F/8ioB2gVmebkMqG +TYBhM4JJ3a70/AiaQ9+3z8MpUg80Nl4Q9PHNDhTyBA0aP8zf1Y30Ck/wSg686YHm +RIZqWHvaNDKBTYJ1gxGZjr8sAv2OHfMQVo2ecWZ+hVuzcc3dKmOsOKFx2kwAvhHw +Sybyhgo6ACJOmKKzhRTXWuH4Snypw75YCZav/rjf4/Jqfl3WF+CaCMFUkx6jYB8Q +7LGXWQ6Z3O5aCCJVJzqCxqwHGAV2yV8CgqisE781luQIV/iD+SscV1ldsK9kQma1 +6L0QMZceFXALKHPoPeJR1ms4ZIJwqaj3rgb7QbWEgO6mbF4g9S7QuPZdwIeW9TMF +CX8MuM24ZQx7dAsDDgNRz5y3pR31FikAEQEAAYkCNgQYAQgAIBYhBDEgQzCXQ+ar +LQ14iqpS2BF8AfxaBQJbq1ZWAhsMAAoJEKpS2BF8AfxahO8P/RBrWOsDy9GcksNt +cms8qYLZrSCBAXq4gOmsefNzfAg+ErWier9cgppAupQ0mGQlA9RUST0QMycBKiTM +MCeavymMpGSPolNCSHNLe+WwzqHnOIPMe9TXODK1em8npVENWVZGhMFIwoUl5api +e8jkcZkFCJkB+mZR2dsOBQIDSakRwm45q2ar8JtoDYEqY/a5JuqzPMaDjRrMBtsE +xfa6Ayso3pbeXtogrV+IvNn1WRjjEuGwUEeTebuF/giwRTEVn1WaJm7f+kOLJgp0 +3mAwB5hhRw2bx9AasomYkbaynRYzmZmDWl+ezOfG6XgPIt7oC1k+D4EbNg6OnbOO +Tx+noUiKG7iBlT4HSvET83K47pHa0CrDOEsiRjFm7vatVdTtMzeZs0Q03sNUCsRb +0utIQN/YRJ6qwBNWQY3kj+9HRHdzEIUkAqilgGqDfXfpYX0clfdtp7x+SYTjtnt0 +iZ6z2pSqLFOBHEx63kWs3irtmZm6eIa8TcAI0xF6+WvMHk4RNG0Dr00Lr8uM6Ow4 +CJWIt4qUZq3ikQvTxkX51yDo9rPbqNOlO4Avi954I8LedTNJ5q4cV9hr4qB+KSko +N8DSBww42845Xo7yje51i6S59OjVSsqnCLcIIPMNs/Uh1sK4zEUNVlEqoc7bRZd7 +bgf9S0HTLeNWcGmMRW+TBMVTOoi2 +=xlgh +-END PGP PUBLIC KEY BLOCK- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b15e6cc6/pom.xml -- d
incubator-unomi git commit: UNOMI-199 add readme with some explanation, fix unstable test, remove dependencies between tests
Repository: incubator-unomi Updated Branches: refs/heads/master 38ddefc48 -> 723cc079b UNOMI-199 add readme with some explanation, fix unstable test, remove dependencies between tests Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/723cc079 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/723cc079 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/723cc079 Branch: refs/heads/master Commit: 723cc079be9f5e2a57cff5f7218139ec5d813d0e Parents: 38ddefc Author: dgaillard Authored: Fri Sep 21 19:53:58 2018 +0200 Committer: dgaillard Committed: Fri Sep 21 19:53:58 2018 +0200 -- itests/README.md| 50 .../java/org/apache/unomi/itests/BaseIT.java| 3 - .../unomi/itests/ConditionEvaluatorIT.java | 5 +- .../apache/unomi/itests/ModifyConsentIT.java| 7 +- .../apache/unomi/itests/ProfileExportIT.java| 113 ++- .../unomi/itests/ProfileImportActorsIT.java | 16 ++- .../unomi/itests/ProfileImportBasicIT.java | 19 +--- .../unomi/itests/ProfileImportRankingIT.java| 36 +++--- .../unomi/itests/ProfileImportSurfersIT.java| 51 + .../apache/unomi/itests/ProfileServiceIT.java | 6 +- .../unomi/itests/PropertiesUpdateActionIT.java | 8 +- .../java/org/apache/unomi/itests/SegmentIT.java | 4 +- itests/src/test/resources/2-surfers-test.csv| 74 ++-- .../test/resources/3-surfers-overwrite-test.csv | 74 ++-- .../test/resources/4-surfers-delete-test.csv| 74 ++-- itests/src/test/resources/5-ranking-test.csv| 52 - itests/src/test/resources/6-actors-test.csv | 14 +-- 17 files changed, 338 insertions(+), 268 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/723cc079/itests/README.md -- diff --git a/itests/README.md b/itests/README.md new file mode 100644 index 000..5a3236c --- /dev/null +++ b/itests/README.md @@ -0,0 +1,50 @@ + + +Apache Unomi Integration tests += + +## Information +You will likely run into situation where you need to wait for the execution of your test. +To do so please avoid long Thread.sleep(1) it tend to make the test unstable, prefer a shorter sleep that you will repeat. +e.g: +```java +boolean isDone = false; +while (!isDone) { +importConfiguration = importConfigurationService.load(itemId); +if (importConfiguration != null && importConfiguration.getStatus() != null) { +isDone = importConfiguration.getStatus().equals(RouterConstants.CONFIG_STATUS_COMPLETE_SUCCESS); +} +Thread.sleep(1000); +} +``` + +**NEVER** create dependencies between your test, even in the same class, the execution order is not guaranteed therefore you may not +have what you expect and it could work fine on your machine but not on others. + +If possible clean what your test created at the end of its execution or at the very least make sure to use unique IDs + +When you need a service from Unomi to execute your test inject it with a filer: +```java +@Inject @Filter(timeout = 6) +protected ProfileService profileService; +``` +This will ensure the service is available before starting the test and if you need a resource like an URL you can do something like this: +```java +@Inject @Filter(value="(configDiscriminator=IMPORT)", timeout = 6) +protected ImportExportConfigurationService importConfigurationService; +``` http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/723cc079/itests/src/test/java/org/apache/unomi/itests/BaseIT.java -- diff --git a/itests/src/test/java/org/apache/unomi/itests/BaseIT.java b/itests/src/test/java/org/apache/unomi/itests/BaseIT.java index 3d3e610..635c52c 100644 --- a/itests/src/test/java/org/apache/unomi/itests/BaseIT.java +++ b/itests/src/test/java/org/apache/unomi/itests/BaseIT.java @@ -38,11 +38,8 @@ import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.*; public abstract class BaseIT { protected static final String HTTP_PORT = "8181"; - protected static final String URL = "http://localhost:"; + HTTP_PORT; - protected static final String KARAF_DIR = "target/exam"; - protected static final String UNOMI_KEY = "670c26d1cc413346c3b2fd9ce65dab41"; @Configuration http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/723cc079/itests/src/test/java/org/apache/unomi/itests/ConditionEvaluatorIT.java -- diff --git a/itests/src/test/jav
incubator-unomi git commit: UNOMI-199 fix integration test, increase reliability, add integration test to test multiple visitor login on same browser
Repository: incubator-unomi Updated Branches: refs/heads/master a171e3d8f -> 38ddefc48 UNOMI-199 fix integration test, increase reliability, add integration test to test multiple visitor login on same browser Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/38ddefc4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/38ddefc4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/38ddefc4 Branch: refs/heads/master Commit: 38ddefc48522977ddbbf93ccc08c9cea12362cad Parents: a171e3d Author: dgaillard Authored: Fri Sep 21 16:49:16 2018 +0200 Committer: dgaillard Committed: Fri Sep 21 16:49:16 2018 +0200 -- itests/pom.xml | 11 +- .../java/org/apache/unomi/itests/AllITs.java| 2 +- .../java/org/apache/unomi/itests/BaseIT.java| 19 +- .../java/org/apache/unomi/itests/BasicIT.java | 314 +-- .../apache/unomi/itests/ModifyConsentIT.java| 4 +- .../unomi/itests/ProfileImportActorsIT.java | 6 +- .../unomi/itests/ProfileImportBasicIT.java | 75 ++--- .../unomi/itests/ProfileImportRankingIT.java| 6 +- .../unomi/itests/ProfileImportSurfersIT.java| 8 +- .../java/org/apache/unomi/itests/TestUtils.java | 7 +- itests/src/test/resources/1-basic-test.csv | 6 +- itests/src/test/resources/testLogin.json| 34 ++ .../test/resources/testLoginEventCondition.json | 23 ++ .../apache/unomi/lifecycle/BundleWatcher.java | 2 +- .../resources/OSGI-INF/blueprint/blueprint.xml | 6 + 15 files changed, 435 insertions(+), 88 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/38ddefc4/itests/pom.xml -- diff --git a/itests/pom.xml b/itests/pom.xml index eb42ba2..2e9b6fc 100644 --- a/itests/pom.xml +++ b/itests/pom.xml @@ -56,7 +56,13 @@ ${project.version} test - + +org.apache.unomi +unomi-lifecycle-watcher +${project.version} +test + + org.apache.karaf.features standard @@ -171,12 +177,13 @@ com.github.alexcojocaru elasticsearch-maven-plugin -5.7 +5.6 contextElasticSearchITests 9500 9400 ${elasticsearch.version} +true
incubator-unomi git commit: UNOMI-199 fix issue when multiple visitor log on the same browser, improve logging, refactor code to avoid duplication
Repository: incubator-unomi Updated Branches: refs/heads/master 11c847c05 -> a171e3d8f UNOMI-199 fix issue when multiple visitor log on the same browser, improve logging, refactor code to avoid duplication Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/a171e3d8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/a171e3d8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/a171e3d8 Branch: refs/heads/master Commit: a171e3d8f6fee354285768e112b27c6c3ebd8d2a Parents: 11c847c Author: dgaillard Authored: Fri Sep 21 16:45:16 2018 +0200 Committer: dgaillard Committed: Fri Sep 21 16:45:30 2018 +0200 -- .../ElasticSearchPersistenceServiceImpl.java| 12 +- .../actions/MergeProfilesOnPropertyAction.java | 91 +++- .../main/java/org/apache/unomi/web/Changes.java | 43 .../org/apache/unomi/web/ContextServlet.java| 229 +-- .../unomi/web/EventsCollectorServlet.java | 87 +++ .../java/org/apache/unomi/web/HttpUtils.java| 6 + .../org/apache/unomi/web/ServletCommon.java | 100 .../resources/OSGI-INF/blueprint/blueprint.xml | 2 + 8 files changed, 328 insertions(+), 242 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/a171e3d8/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java -- diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java index def798f..46e7cbb 100644 --- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java +++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java @@ -692,11 +692,12 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService, try { String source = ESCustomObjectMapper.getObjectMapper().writeValueAsString(item); String itemType = item.getItemType(); -putInCache(item.getItemId(), item); +String itemId = item.getItemId(); +putInCache(itemId, item); String index = indexNames.containsKey(itemType) ? indexNames.get(itemType) : (itemsMonthlyIndexed.contains(itemType) ? getMonthlyIndexName(((TimestampedItem) item).getTimeStamp()) : indexName); -IndexRequestBuilder indexBuilder = client.prepareIndex(index, itemType, item.getItemId()) -.setSource(source); +IndexRequestBuilder indexBuilder = client.prepareIndex(index, itemType, itemId) +.setSource(source, XContentType.JSON); if (routingByType.containsKey(itemType)) { indexBuilder = indexBuilder.setRouting(routingByType.get(itemType)); } @@ -708,6 +709,9 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService, bulkProcessor.add(indexBuilder.request()); } } catch (IndexNotFoundException e) { +logger.error("Could not find index {}, could not register item type {} with id {} ", +index, itemType, itemId, e); +return false; } return true; } catch (IOException e) { @@ -1172,7 +1176,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService, try { logger.info("Saving query : " + queryName); client.prepareIndex(indexName, ".percolator", queryName) -.setSource(query) +.setSource(query, XContentType.JSON) .setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE) .execute().actionGet(); return true; http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/a171e3d8/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/MergeProfilesOnPropertyAction.java -- diff --git a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/MergeProfiles
[3/3] incubator-unomi git commit: UNOMI-187 created unomi plugin for analytics.js, cleanup files, renamed web-tracker-core to web-tracker-wab, renamed analytics.js file to unomi-tracker.js and global
UNOMI-187 created unomi plugin for analytics.js, cleanup files, renamed web-tracker-core to web-tracker-wab, renamed analytics.js file to unomi-tracker.js and global variable analytics to unomiTracker so we can use the tracket event there is a version of analytics js on the site Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/b32fce9e Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/b32fce9e Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/b32fce9e Branch: refs/heads/master Commit: b32fce9e9a5d2246f927fa427343a54f85c64f0f Parents: 191fbba Author: dgaillard Authored: Wed Sep 19 11:30:00 2018 +0200 Committer: dgaillard Committed: Wed Sep 19 11:30:18 2018 +0200 -- extensions/web-tracker/README.md|81 + extensions/web-tracker/core/pom.xml |73 - .../resources/OSGI-INF/blueprint/blueprint.xml |22 - .../src/main/resources/messages_en.properties |16 - extensions/web-tracker/karaf-kar/pom.xml| 2 +- .../karaf-kar/src/main/feature/feature.xml | 2 +- extensions/web-tracker/pom.xml | 2 +- extensions/web-tracker/wab/.gitignore | 3 + extensions/web-tracker/wab/package.json |25 + extensions/web-tracker/wab/pom.xml |75 + .../analytics.js-integration-apache-unomi.js| 447 + .../wab/src/main/javascript/index.js|50 + .../wab/src/main/javascript/integrations.js |22 + .../src/main/webapp/javascript/unomi-tracker.js | 13069 + extensions/web-tracker/wab/yarn.lock| 2072 +++ kar/pom.xml | 2 +- pom.xml | 4 + .../resources/OSGI-INF/blueprint/blueprint.xml | 2 +- 18 files changed, 15853 insertions(+), 116 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b32fce9e/extensions/web-tracker/README.md -- diff --git a/extensions/web-tracker/README.md b/extensions/web-tracker/README.md index ae99847..2cc182a 100644 --- a/extensions/web-tracker/README.md +++ b/extensions/web-tracker/README.md @@ -22,3 +22,84 @@ Apache Unomi Web Tracker This extension is providing the web tracker to start collecting visitors data on your website ## Getting started + +```html + +window.unomiTracker || (window.unomiTracker = {}); +window.unomiTracker_queue || (window.unomiTracker_queue = []); +(function() { +var methods = ['trackSubmit', 'trackClick', 'trackLink', 'trackForm', 'initialize', 'pageview', 'identify', 'reset', 'group', +'track', 'ready', 'alias', 'debug', 'page', 'once', 'off', 'on']; + +var factory = function(method) { +return function () { +var args = Array.prototype.slice.call(arguments); +args.unshift(method); +window.unomiTracker_queue.push(args); +return window.unomiTracker; +}; +}; + +// For each of our methods, generate a queueing stub. +for (var i = 0; i < methods.length; i++) { +var method = methods[i]; +window.unomiTracker[method] = factory(method); +} +})(); + +// Define a method to load Analytics.js from our CDN, +// and that will be sure to only ever load it once. +unomiTracker.load = function(callback, option) { +console.log('load'); +// Create an async script element based on your key. +var script = document.createElement('script'); +script.type = 'text/javascript'; +script.async = true; +// TODO we might want to add a check on the url to see if it ends with / or not +script.src = option.url + '/tracker/javascript/dist/unomi-tracker.js'; + +if (script.addEventListener) { +script.addEventListener('load', function(e) { +if (typeof callback === 'function') { +callback(e); +} +}, false); +} else { +script.onreadystatechange = function () { +if (this.readyState == 'complete' || this.readyState == 'loaded') { +callback(window.event); +} +}; +} + +// Insert our script next to the first script element. +var first = document.getElementsByTagName('script')[0];
[1/3] incubator-unomi git commit: UNOMI-187 created unomi plugin for analytics.js, cleanup files, renamed web-tracker-core to web-tracker-wab, renamed analytics.js file to unomi-tracker.js and global
Repository: incubator-unomi Updated Branches: refs/heads/master 191fbbaab -> b32fce9e9 http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b32fce9e/extensions/web-tracker/wab/yarn.lock -- diff --git a/extensions/web-tracker/wab/yarn.lock b/extensions/web-tracker/wab/yarn.lock new file mode 100644 index 000..8eae82b --- /dev/null +++ b/extensions/web-tracker/wab/yarn.lock @@ -0,0 +1,2072 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@ndhoule/after@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@ndhoule/after/-/after-1.0.0.tgz#e6d86d121448247ac742ff3a61c63fae83ee1191"; + dependencies: +"@ndhoule/arity" "^2.0.0" + +"@ndhoule/arity@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@ndhoule/arity/-/arity-2.0.0.tgz#26bfa0b9755ced9aea819d4e6e7a93db27a5b658"; + +"@ndhoule/clone@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@ndhoule/clone/-/clone-1.0.0.tgz#0f68394a95008cf360370e101924564a70927afc"; + dependencies: +component-type "^1.2.1" + +"@ndhoule/defaults@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@ndhoule/defaults/-/defaults-2.0.1.tgz#704aae3c601a4e4a1a10f0876a2d3253bc7d4d9b"; + dependencies: +"@ndhoule/drop" "^2.0.0" +"@ndhoule/rest" "^2.0.0" + +"@ndhoule/drop@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@ndhoule/drop/-/drop-2.0.0.tgz#bcab1f3041555eaf84ce84e16475ff42ee949c8c"; + +"@ndhoule/each@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@ndhoule/each/-/each-2.0.1.tgz#bbed372a603e0713a3193c706a73ddebc5b426a9"; + dependencies: +"@ndhoule/keys" "^2.0.0" + +"@ndhoule/every@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@ndhoule/every/-/every-2.0.1.tgz#3907d8b6c430493dbb619c18071ce9055f8a106d"; + dependencies: +"@ndhoule/each" "^2.0.1" + +"@ndhoule/extend@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@ndhoule/extend/-/extend-2.0.0.tgz#8c9aa5c9b2f0a012104ffe214cd9746572b9aeb6"; + +"@ndhoule/foldl@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@ndhoule/foldl/-/foldl-2.0.1.tgz#788acedfa2cfd12ecb0b84d2beaf650d97be84f2"; + dependencies: +"@ndhoule/each" "^2.0.1" + +"@ndhoule/includes@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@ndhoule/includes/-/includes-2.0.1.tgz#051ff5eb042c8fa17e7158f0a8a70172e1affaa5"; + dependencies: +"@ndhoule/each" "^2.0.1" + +"@ndhoule/keys@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@ndhoule/keys/-/keys-2.0.0.tgz#3d64ae677c65a261747bf3a457c62eb292a4e0ce"; + +"@ndhoule/map@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@ndhoule/map/-/map-2.0.1.tgz#f5ca0a47424ea67f46e2a6d499b9e9bc886aefa8"; + dependencies: +"@ndhoule/each" "^2.0.1" + +"@ndhoule/pick@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@ndhoule/pick/-/pick-2.0.0.tgz#e1eb1a6ca3243eef56daa095c3a1612c74a52156"; + +"@ndhoule/rest@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@ndhoule/rest/-/rest-2.0.0.tgz#0346b02a964a513ed2ba24d164f01d34f2107a0f"; + +"@segment/analytics.js-core@^3.7.2": + version "3.7.2" + resolved "https://registry.yarnpkg.com/@segment/analytics.js-core/-/analytics.js-core-3.7.2.tgz#4e663b49ec5c9cb6baf40394ba798a6d84075a1f"; + dependencies: +"@ndhoule/after" "^1.0.0" +"@ndhoule/clone" "^1.0.0" +"@ndhoule/defaults" "^2.0.1" +"@ndhoule/each" "^2.0.1" +"@ndhoule/extend" "^2.0.0" +"@ndhoule/foldl" "^2.0.1" +"@ndhoule/includes" "^2.0.1" +"@ndhoule/keys" "^2.0.0" +"@ndhoule/map" "^2.0.1" +"@ndhoule/pick" "^2.0.0" +"@segment/canonical" "^1.0.0" +"@segment/is-meta" "^1.0.0" +"@segment/isodate" "^1.0.2" +"@segment/isodate-traverse" "^1.0.1" +"@segment/prevent-default" "^1.0.0" +"@segment/send-json" "^3.0.0" +"@segment/store" "^1.3.20" +"@segment/top-domain" "^3.0.0" +bind-all "^1.0.0" +component-cookie "^1.1.2" +component-emitter "^1.2.1" +component-event "^0.1.4" +component-querystring "^2.0.0" +component-type "^1.2.1" +component-url "^0.2.1" +debug "^0.7.4" +extend "3.0.1" +inherits "^2.0.1" +install "^0.7.3" +is "^3.1.0" +json3 "^3.3.2" +new-date "^1.0.0" +next-tick "^0.2.2" +segmentio-facade "^3.0.2" +uuid "^2.0.2" + +"@segment/analytics.js-integration@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@segment/analytics.js-integration/-/analytics.js-integration-2.1.1.tgz#cdc58cdac19874eb3f088e4c3c74055dc4ef178c"; + dependencies: +"@ndhoule/after" "^1.0.0" +"@ndhoule/clone" "^1.0.0" +"@ndhoule/defaults" "^2.0.1" +"@ndhoule/each" "^2.0.1" +"@ndhoule/every" "^2.0.1" +"@ndhoule/extend" "^2.0.0" +"@ndhoule/foldl" "^2.0.
[2/3] incubator-unomi git commit: UNOMI-187 created unomi plugin for analytics.js, cleanup files, renamed web-tracker-core to web-tracker-wab, renamed analytics.js file to unomi-tracker.js and global
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b32fce9e/extensions/web-tracker/wab/src/main/webapp/javascript/unomi-tracker.js -- diff --git a/extensions/web-tracker/wab/src/main/webapp/javascript/unomi-tracker.js b/extensions/web-tracker/wab/src/main/webapp/javascript/unomi-tracker.js new file mode 100644 index 000..5dc9271 --- /dev/null +++ b/extensions/web-tracker/wab/src/main/webapp/javascript/unomi-tracker.js @@ -0,0 +1,13069 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.unomiTracker = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i ['arg1', 'arg2'] + */ +var createParams = function createParams(n) { + var args = []; + + for (var i = 1; i <= n; i += 1) { +args.push('arg' + i); + } + + return args; +}; + + /** + * Dynamically construct a wrapper function of `n` arity that. + * + * If at all possible, prefer a function from the arity wrapper cache above to + * avoid allocating a new function at runtime. + * + * @name createArityWrapper + * @api private + * @param {number} n + * @return {Function(Function)} + */ +var createArityWrapper = function createArityWrapper(n) { + var paramNames = createParams(n).join(', '); + var wrapperBody = ''.concat( +' return function(', paramNames, ') {\n', +'return func.apply(this, arguments);\n', +' };' + ); + + /* eslint-disable no-new-func */ + return new Function('func', wrapperBody); + /* eslint-enable no-new-func */ +}; + +// Cache common arity wrappers to avoid constructing them at runtime +var arityWrapperCache = [ + /* eslint-disable no-unused-vars */ + function(fn) { +return function() { + return fn.apply(this, arguments); +}; + }, + + function(fn) { +return function(arg1) { + return fn.apply(this, arguments); +}; + }, + + function(fn) { +return function(arg1, arg2) { + return fn.apply(this, arguments); +}; + }, + + function(fn) { +return function(arg1, arg2, arg3) { + return fn.apply(this, arguments); +}; + }, + + function(fn) { +return function(arg1, arg2, arg3, arg4) { + return fn.apply(this, arguments); +}; + }, + + function(fn) { +return function(arg1, arg2, arg3, arg4, arg5) { + return fn.apply(this, arguments); +}; + } + /* eslint-enable no-unused-vars */ +]; + +/** + * Takes a function and an [arity](https://en.wikipedia.org/wiki/Arity) `n`, and returns a new + * function that expects `n` arguments. + * + * @name arity + * @api public + * @category Function + * @see {@link curry} + * @param {Number} n The desired arity of the returned function. + * @param {Function} fn The function to wrap. + * @return {Function} A function of n arity, wrapping `fn`. + * @example + * var add = function(a, b) { + * return a + b; + * }; + * + * // Check the number of arguments this function expects by accessing `.length`: + * add.length; + * //=> 2 + * + * var unaryAdd = arity(1, add); + * unaryAdd.length; + * //=> 1 + */ +var arity = function arity(n, func) { + if (!isFunction(func)) { +throw new TypeError('Expected a function but got ' + typeof func); + } + + n = Math.max(isNumber(n) ? n : 0, 0); + + if (!arityWrapperCache[n]) { +arityWrapperCache[n] = createArityWrapper(n); + } + + return arityWrapperCache[n](func); +}; + +/* + * Exports. + */ + +module.exports = arity; + +},{}],3:[function(require,module,exports){ +'use strict'; + +/* + * Module dependencies. + */ + +var type = require('component-type'); + +/** + * Deeply clone an object. + * + * @param {*} obj Any object. + */ + +var clone = function clone(obj) { + var t = type(obj); + + if (t === 'object') { +var copy = {}; +for (var key in obj) { + if (obj.hasOwnProperty(key)) { +copy[key] = clone(obj[key]); + } +} +return copy; + } + + if (t === 'array') { +var copy = new Array(obj.length); +for (var i = 0, l = obj.length; i < l; i++) { + copy[i] = clone(obj[i]); +} +return copy; + } + + if (t === 'regexp') { +// from millermedeiros/amd-utils - MIT +var flags = ''; +flags += obj.multiline ? 'm' : ''; +flags += obj.global ? 'g' : ''; +flags += obj.ignoreCase ? 'i' : ''; +return new RegExp(obj.source, flags); + } +
incubator-unomi git commit: UNOMI-187 create bundle to implement web tracker
Repository: incubator-unomi Updated Branches: refs/heads/master 8a9559ce6 -> fc2eefc2e UNOMI-187 create bundle to implement web tracker Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/fc2eefc2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/fc2eefc2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/fc2eefc2 Branch: refs/heads/master Commit: fc2eefc2e609ca9b44f0cf31ab8826951ae903be Parents: 8a9559c Author: dgaillard Authored: Mon Sep 10 17:38:07 2018 +0200 Committer: dgaillard Committed: Mon Sep 10 17:38:07 2018 +0200 -- extensions/pom.xml | 1 + extensions/web-tracker/README.md| 24 ++ extensions/web-tracker/core/pom.xml | 73 ++ .../resources/OSGI-INF/blueprint/blueprint.xml | 22 ++ .../src/main/resources/messages_en.properties | 16 extensions/web-tracker/karaf-kar/pom.xml| 79 .../karaf-kar/src/main/feature/feature.xml | 28 +++ extensions/web-tracker/pom.xml | 36 + kar/pom.xml | 5 ++ kar/src/main/feature/feature.xml| 1 + package/pom.xml | 10 +++ .../resources/OSGI-INF/blueprint/blueprint.xml | 1 + 12 files changed, 296 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/fc2eefc2/extensions/pom.xml -- diff --git a/extensions/pom.xml b/extensions/pom.xml index 335229f..975c28c 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -38,6 +38,7 @@ salesforce-connector unomi-mailchimp weather-update +web-tracker http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/fc2eefc2/extensions/web-tracker/README.md -- diff --git a/extensions/web-tracker/README.md b/extensions/web-tracker/README.md new file mode 100644 index 000..ae99847 --- /dev/null +++ b/extensions/web-tracker/README.md @@ -0,0 +1,24 @@ + + + +Apache Unomi Web Tracker += + +This extension is providing the web tracker to start collecting visitors data on your website + +## Getting started http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/fc2eefc2/extensions/web-tracker/core/pom.xml -- diff --git a/extensions/web-tracker/core/pom.xml b/extensions/web-tracker/core/pom.xml new file mode 100755 index 000..d29df77 --- /dev/null +++ b/extensions/web-tracker/core/pom.xml @@ -0,0 +1,73 @@ + + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +4.0.0 + +org.apache.unomi +unomi-web-tracker +1.4.0-incubating-SNAPSHOT + + +unomi-web-tracker-core +Apache Unomi :: Extension :: Web Tracker :: Core +This is a simple Apache Unomi plugin. +bundle + + + +org.apache.unomi +unomi-api +${project.version} +provided + + +org.apache.httpcomponents +httpclient-osgi +provided + + +org.apache.httpcomponents +httpcore-osgi +provided + + +com.fasterxml.jackson.core +jackson-databind +provided + + + + + + +org.apache.felix +maven-bundle-plugin +true + + + *;scope=compile|runtime + +* + + + + + + + http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/fc2eefc2/extensions/web-tracker/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml -- diff --git a/extensions/web-tracker/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/extensions/web-tracker/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml new file mode 100755 index 000..325170a --- /dev/null +++ b/extensions/web-tracker/core/src/main/resources/OSGI-INF/blueprint/blueprint.xml @@ -0,0 +1,22 @@ + + +http://www.w3.org/2001/XMLSchema-instance"; + xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"; + xml
incubator-unomi git commit: improve debug logging for the action set remote host info
Repository: incubator-unomi Updated Branches: refs/heads/master 8f44f4be6 -> 989fc3670 improve debug logging for the action set remote host info Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/989fc367 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/989fc367 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/989fc367 Branch: refs/heads/master Commit: 989fc3670a5032abf7f7a7b8d3c19bfa179868df Parents: 8f44f4b Author: dgaillard Authored: Tue Sep 4 18:56:22 2018 +0200 Committer: dgaillard Committed: Tue Sep 4 18:56:22 2018 +0200 -- .../request/actions/SetRemoteHostInfoAction.java| 12 1 file changed, 12 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/989fc367/plugins/request/src/main/java/org/apache/unomi/plugins/request/actions/SetRemoteHostInfoAction.java -- diff --git a/plugins/request/src/main/java/org/apache/unomi/plugins/request/actions/SetRemoteHostInfoAction.java b/plugins/request/src/main/java/org/apache/unomi/plugins/request/actions/SetRemoteHostInfoAction.java index c3042e3..05687e8 100644 --- a/plugins/request/src/main/java/org/apache/unomi/plugins/request/actions/SetRemoteHostInfoAction.java +++ b/plugins/request/src/main/java/org/apache/unomi/plugins/request/actions/SetRemoteHostInfoAction.java @@ -106,8 +106,17 @@ public class SetRemoteHostInfoAction implements ActionExecutor { } String remoteAddr = httpServletRequest.getRemoteAddr(); +if (logger.isDebugEnabled()) { +logger.debug("Remote address is " + remoteAddr); +} String remoteAddrParameter = httpServletRequest.getParameter("remoteAddr"); +if (logger.isDebugEnabled()) { +logger.debug("Remote address param is " + remoteAddr); +} String xff = httpServletRequest.getHeader("X-Forwarded-For"); +if (logger.isDebugEnabled()) { +logger.debug("X-Forwarded-For is " + xff); +} if (remoteAddrParameter != null && remoteAddrParameter.length() > 0) { remoteAddr = remoteAddrParameter; } else if (xff != null && !xff.equals("")) { @@ -116,6 +125,9 @@ public class SetRemoteHostInfoAction implements ActionExecutor { } remoteAddr = xff; } +if (logger.isDebugEnabled()) { +logger.debug("Remote address used to localized is " + remoteAddr); +} try { if (isAValidIPAddress(remoteAddr)) {
[1/7] incubator-unomi git commit: UNOMI-185 create an additional endpoint to execute aggregate query, the new endpoint return a bit less information but is much faster
Repository: incubator-unomi Updated Branches: refs/heads/master ea1b788ec -> 8f44f4be6 UNOMI-185 create an additional endpoint to execute aggregate query, the new endpoint return a bit less information but is much faster Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/7129cdb3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/7129cdb3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/7129cdb3 Branch: refs/heads/master Commit: 7129cdb35e1624de3fa2e29eb2f7f2c19ee3f1ec Parents: af7bfb1 Author: dgaillard Authored: Tue Jun 26 16:36:09 2018 +0200 Committer: dgaillard Committed: Fri Jun 29 10:31:36 2018 +0200 -- .../apache/unomi/api/services/QueryService.java | 14 + .../ElasticSearchPersistenceServiceImpl.java| 64 ++-- .../persistence/spi/PersistenceService.java | 13 .../BooleanConditionESQueryBuilder.java | 12 +++- .../apache/unomi/rest/QueryServiceEndPoint.java | 19 ++ .../services/services/QueryServiceImpl.java | 61 --- 6 files changed, 140 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/7129cdb3/api/src/main/java/org/apache/unomi/api/services/QueryService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/QueryService.java b/api/src/main/java/org/apache/unomi/api/services/QueryService.java index 2465e65..3f3cb7b 100644 --- a/api/src/main/java/org/apache/unomi/api/services/QueryService.java +++ b/api/src/main/java/org/apache/unomi/api/services/QueryService.java @@ -44,6 +44,7 @@ public interface QueryService { * * Retrieves the number of items with the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and aggregated by possible values of the specified * property or, if the specified query is not {@code null}, perform that aggregate query. + * Also return the global count of document matching the {@code ITEM_TYPE} * * @param itemType the String representation of the item type we want to retrieve the count of, as defined by its class' {@code ITEM_TYPE} field * @param property the property we're aggregating on, i.e. for each possible value of this property, we are counting how many items of the specified type have that value @@ -54,6 +55,19 @@ public interface QueryService { Map getAggregate(String itemType, String property, AggregateQuery query); /** + * Retrieves the number of items with the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and aggregated by possible values of the specified + * property or, if the specified query is not {@code null}, perform that aggregate query. + * This aggregate won't return the global count and should therefore be much faster than {@link #getAggregate(String, String, AggregateQuery)} + * + * @param itemType the String representation of the item type we want to retrieve the count of, as defined by its class' {@code ITEM_TYPE} field + * @param property the property we're aggregating on, i.e. for each possible value of this property, we are counting how many items of the specified type have that value + * @param querythe {@link AggregateQuery} specifying the aggregation that should be perfomed + * @return a Map associating a specific value of the property to the cardinality of items with that value + * @see Item Item for a discussion of {@code ITEM_TYPE} + */ +Map getAggregateOptimized(String itemType, String property, AggregateQuery query); + +/** * Retrieves the number of items of the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and matching the specified {@link Condition}. * * @param condition the condition the items must satisfy http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/7129cdb3/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java -- diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java index d5fa185..c7ec8d0 100644 --- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java +++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenc
[7/7] incubator-unomi git commit: Merge branch 'unomi-1.3.x'
Merge branch 'unomi-1.3.x' Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/8f44f4be Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/8f44f4be Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/8f44f4be Branch: refs/heads/master Commit: 8f44f4be65e875668dfbbef6459df040d050c9a9 Parents: ea1b788 d9e9a8f Author: dgaillard Authored: Thu Jul 5 16:13:07 2018 +0200 Committer: dgaillard Committed: Thu Jul 5 16:13:07 2018 +0200 -- .../java/org/apache/unomi/api/Parameter.java| 3 + .../unomi/api/services/DefinitionsService.java | 1 + .../api/services/PersonalizationService.java| 3 +- .../unomi/api/services/PrivacyService.java | 11 +-- .../apache/unomi/api/services/QueryService.java | 16 + .../privacy/internal/PrivacyServiceImpl.java| 2 +- .../ElasticSearchPersistenceServiceImpl.java| 70 ++-- .../persistence/spi/PersistenceService.java | 15 + .../BooleanConditionESQueryBuilder.java | 12 +++- .../PastEventConditionESQueryBuilder.java | 2 +- .../apache/unomi/rest/QueryServiceEndPoint.java | 14 +++- .../apache/unomi/rest/RulesServiceEndPoint.java | 3 +- .../unomi/rest/ScoringServiceEndPoint.java | 5 +- .../unomi/rest/SegmentServiceEndPoint.java | 3 +- .../services/DefinitionsServiceImpl.java| 4 ++ .../services/services/EventServiceImpl.java | 2 +- .../services/services/GoalsServiceImpl.java | 4 +- .../services/services/QueryServiceImpl.java | 67 --- .../services/services/SegmentServiceImpl.java | 2 +- .../versions/1.1/building-and-deploying.md | 4 +- src/site/markdown/versions/1.1/concepts.md | 2 +- .../markdown/versions/1.1/getting-started.md| 2 +- .../versions/1.2/building-and-deploying.md | 4 +- .../versions/master/building-and-deploying.md | 4 +- src/site/markdown/versions/master/concepts.md | 3 +- .../markdown/versions/master/twitter-sample.md | 2 +- 26 files changed, 186 insertions(+), 74 deletions(-) --
[4/7] incubator-unomi git commit: UNOMI-186 clean @Deprecated documentation, add version of deprecation, add missing tag
UNOMI-186 clean @Deprecated documentation, add version of deprecation, add missing tag Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/c0662043 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/c0662043 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/c0662043 Branch: refs/heads/master Commit: c06620437bd67eaa16434641cdb0d512300fa5c9 Parents: b712694 Author: dgaillard Authored: Fri Jun 29 11:17:42 2018 +0200 Committer: dgaillard Committed: Fri Jun 29 11:17:42 2018 +0200 -- api/src/main/java/org/apache/unomi/api/Parameter.java| 2 +- .../org/apache/unomi/api/services/DefinitionsService.java| 1 + .../apache/unomi/api/services/PersonalizationService.java| 2 +- .../java/org/apache/unomi/api/services/PrivacyService.java | 8 .../java/org/apache/unomi/api/services/QueryService.java | 1 + .../elasticsearch/ElasticSearchPersistenceServiceImpl.java | 1 + .../org/apache/unomi/persistence/spi/PersistenceService.java | 1 + .../java/org/apache/unomi/rest/RulesServiceEndPoint.java | 2 +- .../java/org/apache/unomi/rest/ScoringServiceEndPoint.java | 2 +- .../java/org/apache/unomi/rest/SegmentServiceEndPoint.java | 2 +- .../unomi/services/services/DefinitionsServiceImpl.java | 2 +- .../org/apache/unomi/services/services/QueryServiceImpl.java | 3 ++- 12 files changed, 16 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/Parameter.java -- diff --git a/api/src/main/java/org/apache/unomi/api/Parameter.java b/api/src/main/java/org/apache/unomi/api/Parameter.java index c4d7d99..c8a1f9e 100644 --- a/api/src/main/java/org/apache/unomi/api/Parameter.java +++ b/api/src/main/java/org/apache/unomi/api/Parameter.java @@ -47,7 +47,7 @@ public class Parameter implements Serializable { return multivalued; } -@Deprecated +@Deprecated // As of version 1.1.0-incubating public void setChoiceListInitializerFilter(String choiceListInitializerFilter) { // Avoid errors when deploying old definitions } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java b/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java index 4b1a141..25ec40b 100644 --- a/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java +++ b/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java @@ -181,6 +181,7 @@ public interface DefinitionsService { * @param rootCondition the root condition where to start the extraction by class * @param tag the tag to use to extract the condition * @return Condition the condition that has been found matching the tag, or null if none matched + * @deprecated As of 1.2.0-incubating, please use {@link #extractConditionBySystemTag(Condition, String)} instead */ @Deprecated Condition extractConditionByTag(Condition rootCondition, String tag); http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java b/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java index 5cff730..d8df08c 100644 --- a/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java +++ b/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java @@ -131,7 +131,7 @@ public interface PersonalizationService { * Sets the filter identifier associated with this content filtering definition. * * @param filterid the filter identifier associated with this content filtering definition - * @deprecated this method is deprecated use the setId method instead + * @deprecated As of version 1.3.0-incubating, please use {@link #setId(String)} instead */ public void setFilterid(String filterid) { this.id = filterid; http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java b/api/src/main/java/org/apache/unomi/api/services
[5/7] incubator-unomi git commit: UNOMI-186 clean markdown documentation
UNOMI-186 clean markdown documentation Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/d5d84504 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/d5d84504 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/d5d84504 Branch: refs/heads/master Commit: d5d845046ac3e4778dd4e3805a4d9bff4d7bb19a Parents: c066204 Author: dgaillard Authored: Fri Jun 29 11:29:33 2018 +0200 Committer: dgaillard Committed: Fri Jun 29 11:29:33 2018 +0200 -- src/site/markdown/versions/1.1/building-and-deploying.md| 4 ++-- src/site/markdown/versions/1.1/concepts.md | 2 +- src/site/markdown/versions/1.1/getting-started.md | 2 +- src/site/markdown/versions/1.2/building-and-deploying.md| 4 ++-- src/site/markdown/versions/master/building-and-deploying.md | 4 ++-- src/site/markdown/versions/master/concepts.md | 3 +-- src/site/markdown/versions/master/twitter-sample.md | 2 +- 7 files changed, 10 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5d84504/src/site/markdown/versions/1.1/building-and-deploying.md -- diff --git a/src/site/markdown/versions/1.1/building-and-deploying.md b/src/site/markdown/versions/1.1/building-and-deploying.md index 6b3c525..7d39902 100644 --- a/src/site/markdown/versions/1.1/building-and-deploying.md +++ b/src/site/markdown/versions/1.1/building-and-deploying.md @@ -38,11 +38,11 @@ Simply uncompress the `package/target/unomi-VERSION.tar.gz` (for Linux or Mac OS You can then start the server simply by using the command on UNIX/Linux/MacOS X : -./bin/karaf start +./bin/karaf or on Windows shell : -bin\karaf.bat start +bin\karaf.bat Deploying into an existing Karaf server http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5d84504/src/site/markdown/versions/1.1/concepts.md -- diff --git a/src/site/markdown/versions/1.1/concepts.md b/src/site/markdown/versions/1.1/concepts.md index 79cb748..4f4e7be 100644 --- a/src/site/markdown/versions/1.1/concepts.md +++ b/src/site/markdown/versions/1.1/concepts.md @@ -51,7 +51,7 @@ Some types can be dynamically defined at runtime by calling to the REST API whil "metadata": { "id": "tweetNb", "name": "tweetNb", -"systemTags": ["social"] +"tags": ["social"] }, "target": "profiles", "type": "integer" http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5d84504/src/site/markdown/versions/1.1/getting-started.md -- diff --git a/src/site/markdown/versions/1.1/getting-started.md b/src/site/markdown/versions/1.1/getting-started.md index 6303c78..809a75b 100644 --- a/src/site/markdown/versions/1.1/getting-started.md +++ b/src/site/markdown/versions/1.1/getting-started.md @@ -322,7 +322,7 @@ Let's now look at our custom [`incrementTweetNumberAction`](https://github.com/a { "id": "incrementTweetNumberAction", "actionExecutor": "incrementTweetNumber", - "systemTags": [ + "tags": [ "event" ], "parameters": [] http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5d84504/src/site/markdown/versions/1.2/building-and-deploying.md -- diff --git a/src/site/markdown/versions/1.2/building-and-deploying.md b/src/site/markdown/versions/1.2/building-and-deploying.md index f5a2fb2..253fd0b 100644 --- a/src/site/markdown/versions/1.2/building-and-deploying.md +++ b/src/site/markdown/versions/1.2/building-and-deploying.md @@ -86,11 +86,11 @@ Simply uncompress the package/target/unomi-VERSION.tar.gz (for Linux or Mac OS X You can then start the server simply by using the command on UNIX/Linux/MacOS X : -./bin/karaf start +./bin/karaf or on Windows shell : -bin\karaf.bat start +bin\karaf.bat Deploying into an existing Karaf server http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5d84504/src/site/markdown/versions/master/building-and-deploying.md -- diff --git a/src/site/markdown/versions/master/building-and-deploying.md b/src/site/markdown/versions/master/building-and-deploying.md index a62bccd..042201b 100644 --- a/src/site/markdown/versions/master/building-and-deploying.md +++ b/
[6/7] incubator-unomi git commit: UNOMI-186 improve deprecation marking
UNOMI-186 improve deprecation marking Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/d9e9a8f4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/d9e9a8f4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/d9e9a8f4 Branch: refs/heads/master Commit: d9e9a8f49eab227930511d9cc8333a847968de0c Parents: d5d8450 Author: dgaillard Authored: Fri Jun 29 12:11:34 2018 +0200 Committer: dgaillard Committed: Fri Jun 29 12:11:34 2018 +0200 -- api/src/main/java/org/apache/unomi/api/Parameter.java | 5 - .../org/apache/unomi/api/services/PersonalizationService.java | 1 + .../java/org/apache/unomi/api/services/PrivacyService.java| 7 +-- .../main/java/org/apache/unomi/api/services/QueryService.java | 1 + .../elasticsearch/ElasticSearchPersistenceServiceImpl.java| 5 - .../org/apache/unomi/persistence/spi/PersistenceService.java | 1 + .../main/java/org/apache/unomi/rest/RulesServiceEndPoint.java | 1 + .../java/org/apache/unomi/rest/ScoringServiceEndPoint.java| 3 ++- .../java/org/apache/unomi/rest/SegmentServiceEndPoint.java| 1 + .../unomi/services/services/DefinitionsServiceImpl.java | 6 +- .../org/apache/unomi/services/services/QueryServiceImpl.java | 5 - 11 files changed, 29 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d9e9a8f4/api/src/main/java/org/apache/unomi/api/Parameter.java -- diff --git a/api/src/main/java/org/apache/unomi/api/Parameter.java b/api/src/main/java/org/apache/unomi/api/Parameter.java index c8a1f9e..c59fcab 100644 --- a/api/src/main/java/org/apache/unomi/api/Parameter.java +++ b/api/src/main/java/org/apache/unomi/api/Parameter.java @@ -47,7 +47,10 @@ public class Parameter implements Serializable { return multivalued; } -@Deprecated // As of version 1.1.0-incubating +/** + * @deprecated As of version 1.1.0-incubating + */ +@Deprecated public void setChoiceListInitializerFilter(String choiceListInitializerFilter) { // Avoid errors when deploying old definitions } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d9e9a8f4/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java b/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java index d8df08c..ad6e3a6 100644 --- a/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java +++ b/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java @@ -133,6 +133,7 @@ public interface PersonalizationService { * @param filterid the filter identifier associated with this content filtering definition * @deprecated As of version 1.3.0-incubating, please use {@link #setId(String)} instead */ +@Deprecated public void setFilterid(String filterid) { this.id = filterid; } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d9e9a8f4/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java b/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java index 4b67caf..d860b7c 100644 --- a/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java +++ b/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java @@ -149,23 +149,26 @@ public interface PrivacyService { * @deprecated As of version 1.3.0-incubating, do not use this method, instead mark properties with the personal identifier tag which * will mark them as denied by the getDeniedProperties method */ +@Deprecated Boolean setDeniedProperties(String profileId, List propertyNames); /** * This method doesn't do anything anymore please don't use it - * @deprecated As of version 1.3.0-incubating, do not use this method * @param profileId the identifier of the profile * @return do not use + * @deprecated As of version 1.3.0-incubating, do not use this method */ +@Deprecated List getDeniedPropertyDistribution(String profileId); /** * This method doesn't do anything anymore please don't use it - * @deprecated As of version 1.3.0-incubating, do not use this method * @param profileId the identifier of the profile * @param propertyNames do not use * @return do not use + * @deprecated As of version
[2/7] incubator-unomi git commit: UNOMI-185 refactor and clean code after successful test with optimized query
UNOMI-185 refactor and clean code after successful test with optimized query Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/f579e142 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/f579e142 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/f579e142 Branch: refs/heads/master Commit: f579e1423c51bfb4a1b174a77ce3126ac2185867 Parents: 7129cdb Author: dgaillard Authored: Wed Jun 27 12:01:56 2018 +0200 Committer: dgaillard Committed: Fri Jun 29 10:31:59 2018 +0200 -- .../apache/unomi/api/services/QueryService.java | 2 +- .../ElasticSearchPersistenceServiceImpl.java| 12 +++ .../persistence/spi/PersistenceService.java | 2 +- .../apache/unomi/rest/QueryServiceEndPoint.java | 33 +++- .../services/services/QueryServiceImpl.java | 8 ++--- 5 files changed, 23 insertions(+), 34 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f579e142/api/src/main/java/org/apache/unomi/api/services/QueryService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/QueryService.java b/api/src/main/java/org/apache/unomi/api/services/QueryService.java index 3f3cb7b..6ff5cc3 100644 --- a/api/src/main/java/org/apache/unomi/api/services/QueryService.java +++ b/api/src/main/java/org/apache/unomi/api/services/QueryService.java @@ -65,7 +65,7 @@ public interface QueryService { * @return a Map associating a specific value of the property to the cardinality of items with that value * @see Item Item for a discussion of {@code ITEM_TYPE} */ -Map getAggregateOptimized(String itemType, String property, AggregateQuery query); +Map getAggregateWithOptimizedQuery(String itemType, String property, AggregateQuery query); /** * Retrieves the number of items of the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and matching the specified {@link Condition}. http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f579e142/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java -- diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java index c7ec8d0..0f527db 100644 --- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java +++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java @@ -1482,17 +1482,17 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService, } @Override -public Map aggregateQuery(final Condition filter, final BaseAggregate aggregate, final String itemType) { +public Map aggregateQuery(Condition filter, BaseAggregate aggregate, String itemType) { return aggregateQuery(filter, aggregate, itemType, false); } @Override -public Map aggregateQueryOptimized(Condition filter, BaseAggregate aggregate, String itemType) { +public Map aggregateWithOptimizedQuery(Condition filter, BaseAggregate aggregate, String itemType) { return aggregateQuery(filter, aggregate, itemType, true); } -private Map aggregateQuery(final Condition filter, final BaseAggregate aggregate, final String itemType, final boolean -optimized) { +private Map aggregateQuery(final Condition filter, final BaseAggregate aggregate, final String itemType, +final boolean optimizedQuery) { return new InClassLoaderExecute>(metricsService, this.getClass().getName() + ".aggregateQuery") { @Override @@ -1572,7 +1572,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService, // If the request is optimized then we don't need a global aggregation which is very slow and we can put the query with a // filter on range items in the query block so we don't retrieve all the document before filtering the whole -if (optimized) { +if (optimizedQuery) { for (AggregationBuilder aggregationBuilder : lastAggregation) { builder.addAggregation(aggregationBuilder); } @@ -1600,7 +1600,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
[3/7] incubator-unomi git commit: UNOMI-185 use the optimized aggregation when possible
UNOMI-185 use the optimized aggregation when possible Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/b7126940 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/b7126940 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/b7126940 Branch: refs/heads/master Commit: b712694083ae34cf175958043388f709143a2741 Parents: f579e14 Author: dgaillard Authored: Wed Jun 27 18:47:12 2018 +0200 Committer: dgaillard Committed: Fri Jun 29 10:32:28 2018 +0200 -- .../org/apache/unomi/privacy/internal/PrivacyServiceImpl.java| 2 +- .../baseplugin/conditions/PastEventConditionESQueryBuilder.java | 2 +- .../org/apache/unomi/services/services/EventServiceImpl.java | 2 +- .../org/apache/unomi/services/services/GoalsServiceImpl.java | 4 ++-- .../org/apache/unomi/services/services/SegmentServiceImpl.java | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b7126940/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java -- diff --git a/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java b/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java index d4aad1f..247a7f4 100644 --- a/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java +++ b/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java @@ -68,7 +68,7 @@ public class PrivacyServiceImpl implements PrivacyService { serverInfo.setServerVersion(bundleContext.getBundle().getVersion().toString()); // let's retrieve all the event types the server has seen. -Map eventTypeCounts = persistenceService.aggregateQuery(null, new TermsAggregate("eventType"), Event.ITEM_TYPE); +Map eventTypeCounts = persistenceService.aggregateWithOptimizedQuery(null, new TermsAggregate("eventType"), Event.ITEM_TYPE); List eventTypes = new ArrayList(); for (Map.Entry eventTypeEntry : eventTypeCounts.entrySet()) { EventInfo eventInfo = new EventInfo(); http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b7126940/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java -- diff --git a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java index 7c6217b..e51aaa8 100644 --- a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java +++ b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java @@ -75,7 +75,7 @@ public class PastEventConditionESQueryBuilder implements ConditionESQueryBuilder Integer minimumEventCount = condition.getParameter("minimumEventCount") == null ? 0 : (Integer) condition.getParameter("minimumEventCount"); Integer maximumEventCount = condition.getParameter("maximumEventCount") == null ? Integer.MAX_VALUE : (Integer) condition.getParameter("maximumEventCount"); -Map eventCountByProfile = persistenceService.aggregateQuery(andCondition, new TermsAggregate("profileId"), Event.ITEM_TYPE); +Map eventCountByProfile = persistenceService.aggregateWithOptimizedQuery(andCondition, new TermsAggregate("profileId"), Event.ITEM_TYPE); if (eventCountByProfile != null) { for (Map.Entry entry : eventCountByProfile.entrySet()) { if (!entry.getKey().startsWith("_")) { http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b7126940/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java -- diff --git a/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java index 54b85e4..5e1ed66 100644 --- a/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java +++ b/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java @@ -195,7 +195,7 @@ public class EventServiceImpl implemen
incubator-unomi git commit: UNOMI-186 improve deprecation marking
Repository: incubator-unomi Updated Branches: refs/heads/unomi-1.3.x d5d845046 -> d9e9a8f49 UNOMI-186 improve deprecation marking Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/d9e9a8f4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/d9e9a8f4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/d9e9a8f4 Branch: refs/heads/unomi-1.3.x Commit: d9e9a8f49eab227930511d9cc8333a847968de0c Parents: d5d8450 Author: dgaillard Authored: Fri Jun 29 12:11:34 2018 +0200 Committer: dgaillard Committed: Fri Jun 29 12:11:34 2018 +0200 -- api/src/main/java/org/apache/unomi/api/Parameter.java | 5 - .../org/apache/unomi/api/services/PersonalizationService.java | 1 + .../java/org/apache/unomi/api/services/PrivacyService.java| 7 +-- .../main/java/org/apache/unomi/api/services/QueryService.java | 1 + .../elasticsearch/ElasticSearchPersistenceServiceImpl.java| 5 - .../org/apache/unomi/persistence/spi/PersistenceService.java | 1 + .../main/java/org/apache/unomi/rest/RulesServiceEndPoint.java | 1 + .../java/org/apache/unomi/rest/ScoringServiceEndPoint.java| 3 ++- .../java/org/apache/unomi/rest/SegmentServiceEndPoint.java| 1 + .../unomi/services/services/DefinitionsServiceImpl.java | 6 +- .../org/apache/unomi/services/services/QueryServiceImpl.java | 5 - 11 files changed, 29 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d9e9a8f4/api/src/main/java/org/apache/unomi/api/Parameter.java -- diff --git a/api/src/main/java/org/apache/unomi/api/Parameter.java b/api/src/main/java/org/apache/unomi/api/Parameter.java index c8a1f9e..c59fcab 100644 --- a/api/src/main/java/org/apache/unomi/api/Parameter.java +++ b/api/src/main/java/org/apache/unomi/api/Parameter.java @@ -47,7 +47,10 @@ public class Parameter implements Serializable { return multivalued; } -@Deprecated // As of version 1.1.0-incubating +/** + * @deprecated As of version 1.1.0-incubating + */ +@Deprecated public void setChoiceListInitializerFilter(String choiceListInitializerFilter) { // Avoid errors when deploying old definitions } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d9e9a8f4/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java b/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java index d8df08c..ad6e3a6 100644 --- a/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java +++ b/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java @@ -133,6 +133,7 @@ public interface PersonalizationService { * @param filterid the filter identifier associated with this content filtering definition * @deprecated As of version 1.3.0-incubating, please use {@link #setId(String)} instead */ +@Deprecated public void setFilterid(String filterid) { this.id = filterid; } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d9e9a8f4/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java b/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java index 4b67caf..d860b7c 100644 --- a/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java +++ b/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java @@ -149,23 +149,26 @@ public interface PrivacyService { * @deprecated As of version 1.3.0-incubating, do not use this method, instead mark properties with the personal identifier tag which * will mark them as denied by the getDeniedProperties method */ +@Deprecated Boolean setDeniedProperties(String profileId, List propertyNames); /** * This method doesn't do anything anymore please don't use it - * @deprecated As of version 1.3.0-incubating, do not use this method * @param profileId the identifier of the profile * @return do not use + * @deprecated As of version 1.3.0-incubating, do not use this method */ +@Deprecated List getDeniedPropertyDistribution(String profileId); /** * This method doesn't do anything anymore please don't use it - * @deprecated As of version 1.3.0-incubating, do not use this method * @param profileId the identifier of the
[incubator-unomi] Git Push Summary
Repository: incubator-unomi Updated Branches: refs/heads/feature-optimized-aggregate-query [deleted] b2d410ffc
incubator-unomi git commit: UNOMI-186 clean markdown documentation
Repository: incubator-unomi Updated Branches: refs/heads/unomi-1.3.x c06620437 -> d5d845046 UNOMI-186 clean markdown documentation Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/d5d84504 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/d5d84504 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/d5d84504 Branch: refs/heads/unomi-1.3.x Commit: d5d845046ac3e4778dd4e3805a4d9bff4d7bb19a Parents: c066204 Author: dgaillard Authored: Fri Jun 29 11:29:33 2018 +0200 Committer: dgaillard Committed: Fri Jun 29 11:29:33 2018 +0200 -- src/site/markdown/versions/1.1/building-and-deploying.md| 4 ++-- src/site/markdown/versions/1.1/concepts.md | 2 +- src/site/markdown/versions/1.1/getting-started.md | 2 +- src/site/markdown/versions/1.2/building-and-deploying.md| 4 ++-- src/site/markdown/versions/master/building-and-deploying.md | 4 ++-- src/site/markdown/versions/master/concepts.md | 3 +-- src/site/markdown/versions/master/twitter-sample.md | 2 +- 7 files changed, 10 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5d84504/src/site/markdown/versions/1.1/building-and-deploying.md -- diff --git a/src/site/markdown/versions/1.1/building-and-deploying.md b/src/site/markdown/versions/1.1/building-and-deploying.md index 6b3c525..7d39902 100644 --- a/src/site/markdown/versions/1.1/building-and-deploying.md +++ b/src/site/markdown/versions/1.1/building-and-deploying.md @@ -38,11 +38,11 @@ Simply uncompress the `package/target/unomi-VERSION.tar.gz` (for Linux or Mac OS You can then start the server simply by using the command on UNIX/Linux/MacOS X : -./bin/karaf start +./bin/karaf or on Windows shell : -bin\karaf.bat start +bin\karaf.bat Deploying into an existing Karaf server http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5d84504/src/site/markdown/versions/1.1/concepts.md -- diff --git a/src/site/markdown/versions/1.1/concepts.md b/src/site/markdown/versions/1.1/concepts.md index 79cb748..4f4e7be 100644 --- a/src/site/markdown/versions/1.1/concepts.md +++ b/src/site/markdown/versions/1.1/concepts.md @@ -51,7 +51,7 @@ Some types can be dynamically defined at runtime by calling to the REST API whil "metadata": { "id": "tweetNb", "name": "tweetNb", -"systemTags": ["social"] +"tags": ["social"] }, "target": "profiles", "type": "integer" http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5d84504/src/site/markdown/versions/1.1/getting-started.md -- diff --git a/src/site/markdown/versions/1.1/getting-started.md b/src/site/markdown/versions/1.1/getting-started.md index 6303c78..809a75b 100644 --- a/src/site/markdown/versions/1.1/getting-started.md +++ b/src/site/markdown/versions/1.1/getting-started.md @@ -322,7 +322,7 @@ Let's now look at our custom [`incrementTweetNumberAction`](https://github.com/a { "id": "incrementTweetNumberAction", "actionExecutor": "incrementTweetNumber", - "systemTags": [ + "tags": [ "event" ], "parameters": [] http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5d84504/src/site/markdown/versions/1.2/building-and-deploying.md -- diff --git a/src/site/markdown/versions/1.2/building-and-deploying.md b/src/site/markdown/versions/1.2/building-and-deploying.md index f5a2fb2..253fd0b 100644 --- a/src/site/markdown/versions/1.2/building-and-deploying.md +++ b/src/site/markdown/versions/1.2/building-and-deploying.md @@ -86,11 +86,11 @@ Simply uncompress the package/target/unomi-VERSION.tar.gz (for Linux or Mac OS X You can then start the server simply by using the command on UNIX/Linux/MacOS X : -./bin/karaf start +./bin/karaf or on Windows shell : -bin\karaf.bat start +bin\karaf.bat Deploying into an existing Karaf server http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5d84504/src/site/markdown/versions/master/building-and-deploying.md -- diff --git a/src/site/markdown/versions/master/building-and-deploying.md b/src/site/markdown/versions/master/building-and-deploying.md
incubator-unomi git commit: UNOMI-186 clean @Deprecated documentation, add version of deprecation, add missing tag
Repository: incubator-unomi Updated Branches: refs/heads/unomi-1.3.x b71269408 -> c06620437 UNOMI-186 clean @Deprecated documentation, add version of deprecation, add missing tag Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/c0662043 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/c0662043 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/c0662043 Branch: refs/heads/unomi-1.3.x Commit: c06620437bd67eaa16434641cdb0d512300fa5c9 Parents: b712694 Author: dgaillard Authored: Fri Jun 29 11:17:42 2018 +0200 Committer: dgaillard Committed: Fri Jun 29 11:17:42 2018 +0200 -- api/src/main/java/org/apache/unomi/api/Parameter.java| 2 +- .../org/apache/unomi/api/services/DefinitionsService.java| 1 + .../apache/unomi/api/services/PersonalizationService.java| 2 +- .../java/org/apache/unomi/api/services/PrivacyService.java | 8 .../java/org/apache/unomi/api/services/QueryService.java | 1 + .../elasticsearch/ElasticSearchPersistenceServiceImpl.java | 1 + .../org/apache/unomi/persistence/spi/PersistenceService.java | 1 + .../java/org/apache/unomi/rest/RulesServiceEndPoint.java | 2 +- .../java/org/apache/unomi/rest/ScoringServiceEndPoint.java | 2 +- .../java/org/apache/unomi/rest/SegmentServiceEndPoint.java | 2 +- .../unomi/services/services/DefinitionsServiceImpl.java | 2 +- .../org/apache/unomi/services/services/QueryServiceImpl.java | 3 ++- 12 files changed, 16 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/Parameter.java -- diff --git a/api/src/main/java/org/apache/unomi/api/Parameter.java b/api/src/main/java/org/apache/unomi/api/Parameter.java index c4d7d99..c8a1f9e 100644 --- a/api/src/main/java/org/apache/unomi/api/Parameter.java +++ b/api/src/main/java/org/apache/unomi/api/Parameter.java @@ -47,7 +47,7 @@ public class Parameter implements Serializable { return multivalued; } -@Deprecated +@Deprecated // As of version 1.1.0-incubating public void setChoiceListInitializerFilter(String choiceListInitializerFilter) { // Avoid errors when deploying old definitions } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java b/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java index 4b1a141..25ec40b 100644 --- a/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java +++ b/api/src/main/java/org/apache/unomi/api/services/DefinitionsService.java @@ -181,6 +181,7 @@ public interface DefinitionsService { * @param rootCondition the root condition where to start the extraction by class * @param tag the tag to use to extract the condition * @return Condition the condition that has been found matching the tag, or null if none matched + * @deprecated As of 1.2.0-incubating, please use {@link #extractConditionBySystemTag(Condition, String)} instead */ @Deprecated Condition extractConditionByTag(Condition rootCondition, String tag); http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java b/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java index 5cff730..d8df08c 100644 --- a/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java +++ b/api/src/main/java/org/apache/unomi/api/services/PersonalizationService.java @@ -131,7 +131,7 @@ public interface PersonalizationService { * Sets the filter identifier associated with this content filtering definition. * * @param filterid the filter identifier associated with this content filtering definition - * @deprecated this method is deprecated use the setId method instead + * @deprecated As of version 1.3.0-incubating, please use {@link #setId(String)} instead */ public void setFilterid(String filterid) { this.id = filterid; http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c0662043/api/src/main/java/org/apache/unomi/api/services/PrivacyService.java -- diff --git a/api/src/main/java/org/apache/un
[2/3] incubator-unomi git commit: UNOMI-185 refactor and clean code after successful test with optimized query
UNOMI-185 refactor and clean code after successful test with optimized query Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/f579e142 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/f579e142 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/f579e142 Branch: refs/heads/unomi-1.3.x Commit: f579e1423c51bfb4a1b174a77ce3126ac2185867 Parents: 7129cdb Author: dgaillard Authored: Wed Jun 27 12:01:56 2018 +0200 Committer: dgaillard Committed: Fri Jun 29 10:31:59 2018 +0200 -- .../apache/unomi/api/services/QueryService.java | 2 +- .../ElasticSearchPersistenceServiceImpl.java| 12 +++ .../persistence/spi/PersistenceService.java | 2 +- .../apache/unomi/rest/QueryServiceEndPoint.java | 33 +++- .../services/services/QueryServiceImpl.java | 8 ++--- 5 files changed, 23 insertions(+), 34 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f579e142/api/src/main/java/org/apache/unomi/api/services/QueryService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/QueryService.java b/api/src/main/java/org/apache/unomi/api/services/QueryService.java index 3f3cb7b..6ff5cc3 100644 --- a/api/src/main/java/org/apache/unomi/api/services/QueryService.java +++ b/api/src/main/java/org/apache/unomi/api/services/QueryService.java @@ -65,7 +65,7 @@ public interface QueryService { * @return a Map associating a specific value of the property to the cardinality of items with that value * @see Item Item for a discussion of {@code ITEM_TYPE} */ -Map getAggregateOptimized(String itemType, String property, AggregateQuery query); +Map getAggregateWithOptimizedQuery(String itemType, String property, AggregateQuery query); /** * Retrieves the number of items of the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and matching the specified {@link Condition}. http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f579e142/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java -- diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java index c7ec8d0..0f527db 100644 --- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java +++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java @@ -1482,17 +1482,17 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService, } @Override -public Map aggregateQuery(final Condition filter, final BaseAggregate aggregate, final String itemType) { +public Map aggregateQuery(Condition filter, BaseAggregate aggregate, String itemType) { return aggregateQuery(filter, aggregate, itemType, false); } @Override -public Map aggregateQueryOptimized(Condition filter, BaseAggregate aggregate, String itemType) { +public Map aggregateWithOptimizedQuery(Condition filter, BaseAggregate aggregate, String itemType) { return aggregateQuery(filter, aggregate, itemType, true); } -private Map aggregateQuery(final Condition filter, final BaseAggregate aggregate, final String itemType, final boolean -optimized) { +private Map aggregateQuery(final Condition filter, final BaseAggregate aggregate, final String itemType, +final boolean optimizedQuery) { return new InClassLoaderExecute>(metricsService, this.getClass().getName() + ".aggregateQuery") { @Override @@ -1572,7 +1572,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService, // If the request is optimized then we don't need a global aggregation which is very slow and we can put the query with a // filter on range items in the query block so we don't retrieve all the document before filtering the whole -if (optimized) { +if (optimizedQuery) { for (AggregationBuilder aggregationBuilder : lastAggregation) { builder.addAggregation(aggregationBuilder); } @@ -1600,7 +1600,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
[3/3] incubator-unomi git commit: UNOMI-185 use the optimized aggregation when possible
UNOMI-185 use the optimized aggregation when possible Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/b7126940 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/b7126940 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/b7126940 Branch: refs/heads/unomi-1.3.x Commit: b712694083ae34cf175958043388f709143a2741 Parents: f579e14 Author: dgaillard Authored: Wed Jun 27 18:47:12 2018 +0200 Committer: dgaillard Committed: Fri Jun 29 10:32:28 2018 +0200 -- .../org/apache/unomi/privacy/internal/PrivacyServiceImpl.java| 2 +- .../baseplugin/conditions/PastEventConditionESQueryBuilder.java | 2 +- .../org/apache/unomi/services/services/EventServiceImpl.java | 2 +- .../org/apache/unomi/services/services/GoalsServiceImpl.java | 4 ++-- .../org/apache/unomi/services/services/SegmentServiceImpl.java | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b7126940/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java -- diff --git a/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java b/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java index d4aad1f..247a7f4 100644 --- a/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java +++ b/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java @@ -68,7 +68,7 @@ public class PrivacyServiceImpl implements PrivacyService { serverInfo.setServerVersion(bundleContext.getBundle().getVersion().toString()); // let's retrieve all the event types the server has seen. -Map eventTypeCounts = persistenceService.aggregateQuery(null, new TermsAggregate("eventType"), Event.ITEM_TYPE); +Map eventTypeCounts = persistenceService.aggregateWithOptimizedQuery(null, new TermsAggregate("eventType"), Event.ITEM_TYPE); List eventTypes = new ArrayList(); for (Map.Entry eventTypeEntry : eventTypeCounts.entrySet()) { EventInfo eventInfo = new EventInfo(); http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b7126940/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java -- diff --git a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java index 7c6217b..e51aaa8 100644 --- a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java +++ b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java @@ -75,7 +75,7 @@ public class PastEventConditionESQueryBuilder implements ConditionESQueryBuilder Integer minimumEventCount = condition.getParameter("minimumEventCount") == null ? 0 : (Integer) condition.getParameter("minimumEventCount"); Integer maximumEventCount = condition.getParameter("maximumEventCount") == null ? Integer.MAX_VALUE : (Integer) condition.getParameter("maximumEventCount"); -Map eventCountByProfile = persistenceService.aggregateQuery(andCondition, new TermsAggregate("profileId"), Event.ITEM_TYPE); +Map eventCountByProfile = persistenceService.aggregateWithOptimizedQuery(andCondition, new TermsAggregate("profileId"), Event.ITEM_TYPE); if (eventCountByProfile != null) { for (Map.Entry entry : eventCountByProfile.entrySet()) { if (!entry.getKey().startsWith("_")) { http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b7126940/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java -- diff --git a/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java index 54b85e4..5e1ed66 100644 --- a/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java +++ b/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java @@ -195,7 +195,7 @@ public class EventServiceImpl implemen
[1/3] incubator-unomi git commit: UNOMI-185 create an additional endpoint to execute aggregate query, the new endpoint return a bit less information but is much faster
Repository: incubator-unomi Updated Branches: refs/heads/unomi-1.3.x af7bfb114 -> b71269408 UNOMI-185 create an additional endpoint to execute aggregate query, the new endpoint return a bit less information but is much faster Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/7129cdb3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/7129cdb3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/7129cdb3 Branch: refs/heads/unomi-1.3.x Commit: 7129cdb35e1624de3fa2e29eb2f7f2c19ee3f1ec Parents: af7bfb1 Author: dgaillard Authored: Tue Jun 26 16:36:09 2018 +0200 Committer: dgaillard Committed: Fri Jun 29 10:31:36 2018 +0200 -- .../apache/unomi/api/services/QueryService.java | 14 + .../ElasticSearchPersistenceServiceImpl.java| 64 ++-- .../persistence/spi/PersistenceService.java | 13 .../BooleanConditionESQueryBuilder.java | 12 +++- .../apache/unomi/rest/QueryServiceEndPoint.java | 19 ++ .../services/services/QueryServiceImpl.java | 61 --- 6 files changed, 140 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/7129cdb3/api/src/main/java/org/apache/unomi/api/services/QueryService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/QueryService.java b/api/src/main/java/org/apache/unomi/api/services/QueryService.java index 2465e65..3f3cb7b 100644 --- a/api/src/main/java/org/apache/unomi/api/services/QueryService.java +++ b/api/src/main/java/org/apache/unomi/api/services/QueryService.java @@ -44,6 +44,7 @@ public interface QueryService { * * Retrieves the number of items with the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and aggregated by possible values of the specified * property or, if the specified query is not {@code null}, perform that aggregate query. + * Also return the global count of document matching the {@code ITEM_TYPE} * * @param itemType the String representation of the item type we want to retrieve the count of, as defined by its class' {@code ITEM_TYPE} field * @param property the property we're aggregating on, i.e. for each possible value of this property, we are counting how many items of the specified type have that value @@ -54,6 +55,19 @@ public interface QueryService { Map getAggregate(String itemType, String property, AggregateQuery query); /** + * Retrieves the number of items with the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and aggregated by possible values of the specified + * property or, if the specified query is not {@code null}, perform that aggregate query. + * This aggregate won't return the global count and should therefore be much faster than {@link #getAggregate(String, String, AggregateQuery)} + * + * @param itemType the String representation of the item type we want to retrieve the count of, as defined by its class' {@code ITEM_TYPE} field + * @param property the property we're aggregating on, i.e. for each possible value of this property, we are counting how many items of the specified type have that value + * @param querythe {@link AggregateQuery} specifying the aggregation that should be perfomed + * @return a Map associating a specific value of the property to the cardinality of items with that value + * @see Item Item for a discussion of {@code ITEM_TYPE} + */ +Map getAggregateOptimized(String itemType, String property, AggregateQuery query); + +/** * Retrieves the number of items of the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and matching the specified {@link Condition}. * * @param condition the condition the items must satisfy http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/7129cdb3/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java -- diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java index d5fa185..c7ec8d0 100644 --- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java +++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearc
incubator-unomi git commit: UNOMI-185 use the optimized aggregation when possible
Repository: incubator-unomi Updated Branches: refs/heads/feature-optimized-aggregate-query b6c9c7839 -> b2d410ffc UNOMI-185 use the optimized aggregation when possible Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/b2d410ff Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/b2d410ff Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/b2d410ff Branch: refs/heads/feature-optimized-aggregate-query Commit: b2d410ffcbb18bf15bc3c20647f84db09ab13b1e Parents: b6c9c78 Author: dgaillard Authored: Wed Jun 27 18:47:12 2018 +0200 Committer: dgaillard Committed: Wed Jun 27 18:47:12 2018 +0200 -- .../org/apache/unomi/privacy/internal/PrivacyServiceImpl.java| 2 +- .../baseplugin/conditions/PastEventConditionESQueryBuilder.java | 2 +- .../org/apache/unomi/services/services/EventServiceImpl.java | 2 +- .../org/apache/unomi/services/services/GoalsServiceImpl.java | 4 ++-- .../org/apache/unomi/services/services/SegmentServiceImpl.java | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b2d410ff/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java -- diff --git a/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java b/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java index d4aad1f..247a7f4 100644 --- a/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java +++ b/extensions/privacy-extension/services/src/main/java/org/apache/unomi/privacy/internal/PrivacyServiceImpl.java @@ -68,7 +68,7 @@ public class PrivacyServiceImpl implements PrivacyService { serverInfo.setServerVersion(bundleContext.getBundle().getVersion().toString()); // let's retrieve all the event types the server has seen. -Map eventTypeCounts = persistenceService.aggregateQuery(null, new TermsAggregate("eventType"), Event.ITEM_TYPE); +Map eventTypeCounts = persistenceService.aggregateWithOptimizedQuery(null, new TermsAggregate("eventType"), Event.ITEM_TYPE); List eventTypes = new ArrayList(); for (Map.Entry eventTypeEntry : eventTypeCounts.entrySet()) { EventInfo eventInfo = new EventInfo(); http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b2d410ff/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java -- diff --git a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java index 7c6217b..e51aaa8 100644 --- a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java +++ b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/PastEventConditionESQueryBuilder.java @@ -75,7 +75,7 @@ public class PastEventConditionESQueryBuilder implements ConditionESQueryBuilder Integer minimumEventCount = condition.getParameter("minimumEventCount") == null ? 0 : (Integer) condition.getParameter("minimumEventCount"); Integer maximumEventCount = condition.getParameter("maximumEventCount") == null ? Integer.MAX_VALUE : (Integer) condition.getParameter("maximumEventCount"); -Map eventCountByProfile = persistenceService.aggregateQuery(andCondition, new TermsAggregate("profileId"), Event.ITEM_TYPE); +Map eventCountByProfile = persistenceService.aggregateWithOptimizedQuery(andCondition, new TermsAggregate("profileId"), Event.ITEM_TYPE); if (eventCountByProfile != null) { for (Map.Entry entry : eventCountByProfile.entrySet()) { if (!entry.getKey().startsWith("_")) { http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b2d410ff/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java -- diff --git a/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java index 54b85e4..5e1ed66 100644 --- a/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java +++ b/services
incubator-unomi git commit: UNOMI-185 refactor and clean code after successful test with optimized query
Repository: incubator-unomi Updated Branches: refs/heads/feature-optimized-aggregate-query d7e5c2d2f -> b6c9c7839 UNOMI-185 refactor and clean code after successful test with optimized query Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/b6c9c783 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/b6c9c783 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/b6c9c783 Branch: refs/heads/feature-optimized-aggregate-query Commit: b6c9c7839a350c2bc08be2127035ce2f8745d114 Parents: d7e5c2d Author: dgaillard Authored: Wed Jun 27 12:01:56 2018 +0200 Committer: dgaillard Committed: Wed Jun 27 12:01:56 2018 +0200 -- .../apache/unomi/api/services/QueryService.java | 2 +- .../ElasticSearchPersistenceServiceImpl.java| 12 +++ .../persistence/spi/PersistenceService.java | 2 +- .../apache/unomi/rest/QueryServiceEndPoint.java | 33 +++- .../services/services/QueryServiceImpl.java | 8 ++--- 5 files changed, 23 insertions(+), 34 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b6c9c783/api/src/main/java/org/apache/unomi/api/services/QueryService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/QueryService.java b/api/src/main/java/org/apache/unomi/api/services/QueryService.java index 3f3cb7b..6ff5cc3 100644 --- a/api/src/main/java/org/apache/unomi/api/services/QueryService.java +++ b/api/src/main/java/org/apache/unomi/api/services/QueryService.java @@ -65,7 +65,7 @@ public interface QueryService { * @return a Map associating a specific value of the property to the cardinality of items with that value * @see Item Item for a discussion of {@code ITEM_TYPE} */ -Map getAggregateOptimized(String itemType, String property, AggregateQuery query); +Map getAggregateWithOptimizedQuery(String itemType, String property, AggregateQuery query); /** * Retrieves the number of items of the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and matching the specified {@link Condition}. http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b6c9c783/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java -- diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java index c7ec8d0..0f527db 100644 --- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java +++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java @@ -1482,17 +1482,17 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService, } @Override -public Map aggregateQuery(final Condition filter, final BaseAggregate aggregate, final String itemType) { +public Map aggregateQuery(Condition filter, BaseAggregate aggregate, String itemType) { return aggregateQuery(filter, aggregate, itemType, false); } @Override -public Map aggregateQueryOptimized(Condition filter, BaseAggregate aggregate, String itemType) { +public Map aggregateWithOptimizedQuery(Condition filter, BaseAggregate aggregate, String itemType) { return aggregateQuery(filter, aggregate, itemType, true); } -private Map aggregateQuery(final Condition filter, final BaseAggregate aggregate, final String itemType, final boolean -optimized) { +private Map aggregateQuery(final Condition filter, final BaseAggregate aggregate, final String itemType, +final boolean optimizedQuery) { return new InClassLoaderExecute>(metricsService, this.getClass().getName() + ".aggregateQuery") { @Override @@ -1572,7 +1572,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService, // If the request is optimized then we don't need a global aggregation which is very slow and we can put the query with a // filter on range items in the query block so we don't retrieve all the document before filtering the whole -if (optimized) { +if (optimizedQuery) { for (AggregationBuilder aggregationBuilder : lastAggregation) { builder.addAggr
[2/2] incubator-unomi git commit: UNOMI-185 create an additional endpoint to execute aggregate query, the new endpoint return a bit less information but is much faster
UNOMI-185 create an additional endpoint to execute aggregate query, the new endpoint return a bit less information but is much faster Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/d7e5c2d2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/d7e5c2d2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/d7e5c2d2 Branch: refs/heads/feature-optimized-aggregate-query Commit: d7e5c2d2ff18cc7259eba6c4fef7b4351e790a34 Parents: e467a9e Author: dgaillard Authored: Tue Jun 26 16:36:09 2018 +0200 Committer: dgaillard Committed: Tue Jun 26 16:36:09 2018 +0200 -- .../apache/unomi/api/services/QueryService.java | 14 + .../ElasticSearchPersistenceServiceImpl.java| 64 ++-- .../persistence/spi/PersistenceService.java | 13 .../BooleanConditionESQueryBuilder.java | 12 +++- .../apache/unomi/rest/QueryServiceEndPoint.java | 19 ++ .../services/services/QueryServiceImpl.java | 61 --- 6 files changed, 140 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d7e5c2d2/api/src/main/java/org/apache/unomi/api/services/QueryService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/QueryService.java b/api/src/main/java/org/apache/unomi/api/services/QueryService.java index 2465e65..3f3cb7b 100644 --- a/api/src/main/java/org/apache/unomi/api/services/QueryService.java +++ b/api/src/main/java/org/apache/unomi/api/services/QueryService.java @@ -44,6 +44,7 @@ public interface QueryService { * * Retrieves the number of items with the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and aggregated by possible values of the specified * property or, if the specified query is not {@code null}, perform that aggregate query. + * Also return the global count of document matching the {@code ITEM_TYPE} * * @param itemType the String representation of the item type we want to retrieve the count of, as defined by its class' {@code ITEM_TYPE} field * @param property the property we're aggregating on, i.e. for each possible value of this property, we are counting how many items of the specified type have that value @@ -54,6 +55,19 @@ public interface QueryService { Map getAggregate(String itemType, String property, AggregateQuery query); /** + * Retrieves the number of items with the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and aggregated by possible values of the specified + * property or, if the specified query is not {@code null}, perform that aggregate query. + * This aggregate won't return the global count and should therefore be much faster than {@link #getAggregate(String, String, AggregateQuery)} + * + * @param itemType the String representation of the item type we want to retrieve the count of, as defined by its class' {@code ITEM_TYPE} field + * @param property the property we're aggregating on, i.e. for each possible value of this property, we are counting how many items of the specified type have that value + * @param querythe {@link AggregateQuery} specifying the aggregation that should be perfomed + * @return a Map associating a specific value of the property to the cardinality of items with that value + * @see Item Item for a discussion of {@code ITEM_TYPE} + */ +Map getAggregateOptimized(String itemType, String property, AggregateQuery query); + +/** * Retrieves the number of items of the specified type as defined by the Item subclass public field {@code ITEM_TYPE} and matching the specified {@link Condition}. * * @param condition the condition the items must satisfy http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d7e5c2d2/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java -- diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java index d5fa185..c7ec8d0 100644 --- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java +++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java @@ -1483,6 +1483,16 @@ public class ElasticSea
[1/2] incubator-unomi git commit: [jgitflow-maven-plugin]updating poms for optimized_aggregate_query version
Repository: incubator-unomi Updated Branches: refs/heads/feature-optimized-aggregate-query [created] d7e5c2d2f [jgitflow-maven-plugin]updating poms for optimized_aggregate_query version Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/e467a9ea Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/e467a9ea Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/e467a9ea Branch: refs/heads/feature-optimized-aggregate-query Commit: e467a9ea899b992ea1be8e1fccfccf7f52e11747 Parents: ea1b788 Author: dgaillard Authored: Tue Jun 26 10:58:17 2018 +0200 Committer: dgaillard Committed: Tue Jun 26 10:58:17 2018 +0200 -- api/pom.xml | 2 +- common/pom.xml | 2 +- extensions/geonames/pom.xml | 2 +- extensions/geonames/rest/pom.xml| 8 ++--- extensions/geonames/services/pom.xml| 8 ++--- extensions/lists-extension/actions/pom.xml | 8 ++--- extensions/lists-extension/pom.xml | 4 +-- extensions/lists-extension/rest/pom.xml | 8 ++--- extensions/lists-extension/services/pom.xml | 8 ++--- extensions/pom.xml | 2 +- extensions/privacy-extension/pom.xml| 4 +-- extensions/privacy-extension/rest/pom.xml | 8 ++--- extensions/privacy-extension/services/pom.xml | 8 ++--- extensions/router/pom.xml | 2 +- extensions/router/router-api/pom.xml| 2 +- extensions/router/router-core/pom.xml | 2 +- extensions/router/router-karaf-feature/pom.xml | 2 +- extensions/router/router-rest/pom.xml | 2 +- extensions/router/router-service/pom.xml| 2 +- extensions/salesforce-connector/actions/pom.xml | 6 ++-- .../salesforce-connector/karaf-kar/pom.xml | 10 +++--- extensions/salesforce-connector/pom.xml | 2 +- extensions/salesforce-connector/rest/pom.xml| 8 ++--- .../salesforce-connector/services/pom.xml | 6 ++-- extensions/unomi-mailchimp/actions/pom.xml | 2 +- extensions/unomi-mailchimp/karaf-kar/pom.xml| 2 +- extensions/unomi-mailchimp/pom.xml | 2 +- extensions/unomi-mailchimp/rest/pom.xml | 2 +- extensions/unomi-mailchimp/services/pom.xml | 2 +- extensions/weather-update/core/pom.xml | 2 +- extensions/weather-update/karaf-kar/pom.xml | 4 +-- extensions/weather-update/pom.xml | 2 +- kar/pom.xml | 38 ++-- lifecycle-watcher/pom.xml | 2 +- metrics/pom.xml | 6 ++-- package/pom.xml | 6 ++-- persistence-elasticsearch/core/pom.xml | 8 ++--- persistence-elasticsearch/pom.xml | 2 +- persistence-spi/pom.xml | 4 +-- plugins/baseplugin/pom.xml | 6 ++-- plugins/hover-event/pom.xml | 4 +-- plugins/mail/pom.xml| 4 +-- plugins/optimization-test/pom.xml | 2 +- plugins/past-event/pom.xml | 6 ++-- plugins/pom.xml | 4 +-- plugins/request/pom.xml | 2 +- plugins/tracked-event/pom.xml | 6 ++-- pom.xml | 2 +- rest/pom.xml| 6 ++-- samples/login-integration/pom.xml | 4 +-- samples/pom.xml | 2 +- samples/tweet-button-plugin/pom.xml | 4 +-- services/pom.xml| 8 ++--- tools/pom.xml | 2 +- tools/shell-commands/pom.xml| 2 +- tools/shell-dev-commands/pom.xml| 8 ++--- wab/pom.xml | 6 ++-- 57 files changed, 139 insertions(+), 139 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e467a9ea/api/pom.xml -- diff --git a/api/pom.xml b/api/pom.xml index cc68e9e..0102773 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -22,7 +22,7 @@ org.apache.unomi unomi-root -1.4.0-incubating-SNAPSHOT +1.4.0-incubating-optimized_aggregate_query-SNAPSHOT unomi-api http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e467a9ea/common/pom.xml -- diff --git a/common/pom.xml b/common/pom.xml index c199a96..f7d19b0 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -22,7 +22,7
incubator-unomi git commit: UNOMI-182 add documentation for definition deployment
Repository: incubator-unomi Updated Branches: refs/heads/master 8b068c291 -> c249483b9 UNOMI-182 add documentation for definition deployment Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/c249483b Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/c249483b Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/c249483b Branch: refs/heads/master Commit: c249483b9d51665ee9b0be9874e70f14b48796c1 Parents: 8b068c2 Author: dgaillard Authored: Tue May 29 11:24:54 2018 +0200 Committer: dgaillard Committed: Tue May 29 11:24:54 2018 +0200 -- src/site/markdown/versions/master/custom-extensions.md | 6 ++ 1 file changed, 6 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c249483b/src/site/markdown/versions/master/custom-extensions.md -- diff --git a/src/site/markdown/versions/master/custom-extensions.md b/src/site/markdown/versions/master/custom-extensions.md index e688df2..d288663 100644 --- a/src/site/markdown/versions/master/custom-extensions.md +++ b/src/site/markdown/versions/master/custom-extensions.md @@ -73,6 +73,12 @@ An extension is simply a Maven project, with a Maven pom that looks like this: An extension may contain many different kinds of Apache Unomi objects, as well as custom OSGi services or anything that is needed to build your application. +## Deployment and custom definition + +When you deploy a custom bundle with a custom definition (see "Predefined xxx" chapters under) for the first time, the definition will automatically be deployed at your bundle start event **if it does not exist**, after that if you redeploy the same bundle there are two cases: +1. Your bundle **is a SNAPSHOT** then every time you redeploy it the definition will be redeployed +2. Your bundle **is NOT a SNAPSHOT** then the definition will not be redeployed, but you can redeploy it manually using the command `unomi:deploy-definition ` + ## Predefined segments You may provide pre-defined segments by simply adding a JSON file in the src/main/resources/META-INF/cxs/segments directory of
incubator-unomi git commit: UNOMI-182 fix code issues
Repository: incubator-unomi Updated Branches: refs/heads/master 510c524bf -> 8b068c291 UNOMI-182 fix code issues Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/8b068c29 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/8b068c29 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/8b068c29 Branch: refs/heads/master Commit: 8b068c291dda582f7d0e7cec078384f12e20c082 Parents: 510c524 Author: dgaillard Authored: Wed May 23 12:29:39 2018 +0200 Committer: dgaillard Committed: Wed May 23 12:29:39 2018 +0200 -- .../unomi/shell/commands/DeployDefinition.java | 46 ++-- 1 file changed, 42 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/8b068c29/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/DeployDefinition.java -- diff --git a/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/DeployDefinition.java b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/DeployDefinition.java index abde5ae..e4cbd7f 100644 --- a/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/DeployDefinition.java +++ b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/DeployDefinition.java @@ -56,7 +56,7 @@ public class DeployDefinition extends OsgiCommandSupport { @Argument(index = 0, name = "bundleId", description = "The bundle identifier where to find the definition", required = true, multiValued = false) Long bundleIdentifier; -@Argument(index = 1, name = "fileName", description = "The name of the file which contains the definition", required = true, multiValued = false) +@Argument(index = 1, name = "fileName", description = "The name of the file which contains the definition, without its extension (e.g: firstName)", required = true, multiValued = false) String fileName; protected Object doExecute() throws Exception { @@ -66,10 +66,10 @@ public class DeployDefinition extends OsgiCommandSupport { return null; } -String definitionTypeAnswer = askUserWithAuthorizedAnswer(session,"Which kind of definition do you want to load?" + getDefinitionTypesWithNumber(), Arrays.asList("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")); +String definitionTypeAnswer = askUserWithAuthorizedAnswer(session,"Which kind of definition do you want to load?" + getDefinitionTypesWithNumber() + "\n", Arrays.asList("0", "1", "2", "3", "4", "5", "6", "7", "8", "9")); String definitionType = definitionTypes.get(new Integer(definitionTypeAnswer)); -String path = "META-INF/cxs/" + definitionType; +String path = getDefinitionTypePath(definitionType); Enumeration definitions = bundleToUpdate.findEntries(path, "*.json", true); if (definitions == null) { System.out.println("Couldn't find definitions in bundle with id: " + bundleIdentifier + " and definition path: " + path); @@ -104,7 +104,7 @@ public class DeployDefinition extends OsgiCommandSupport { private String getDefinitionTypesWithNumber() { StringBuilder definitionTypesWithNumber = new StringBuilder(); for (int i = 0; i < definitionTypes.size(); i++) { -definitionTypesWithNumber.append("\n").append(i + 1).append(". ").append(definitionTypes.get(i)); +definitionTypesWithNumber.append("\n").append(i).append(". ").append(definitionTypes.get(i)); } return definitionTypesWithNumber.toString(); } @@ -161,6 +161,44 @@ public class DeployDefinition extends OsgiCommandSupport { } } +private String getDefinitionTypePath(String definitionType) { +StringBuilder path = new StringBuilder("META-INF/cxs/"); +switch (definitionType) { +case "condition": +path.append("conditions"); +break; +case "action": +path.append("actions"); +break; +case "goal": +path.append("goals"); +break; +case "campaign": +path.append("campaigns"); +break; +
incubator-unomi git commit: UNOMI-182 make sure definitions are redeployed if the bundles that bring them is in SNAPSHOT
Repository: incubator-unomi Updated Branches: refs/heads/master f994d99a1 -> 510c524bf UNOMI-182 make sure definitions are redeployed if the bundles that bring them is in SNAPSHOT Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/510c524b Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/510c524b Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/510c524b Branch: refs/heads/master Commit: 510c524bfe0415a1fae8d643e7cac48b667b88b9 Parents: f994d99 Author: dgaillard Authored: Wed May 23 11:49:34 2018 +0200 Committer: dgaillard Committed: Wed May 23 11:49:34 2018 +0200 -- .../unomi/api/services/ProfileService.java | 9 + .../services/DefinitionsServiceImpl.java| 4 +- .../services/services/GoalsServiceImpl.java | 4 +- .../services/services/ProfileServiceImpl.java | 20 +- .../services/services/RulesServiceImpl.java | 2 +- .../services/services/SegmentServiceImpl.java | 4 +- .../unomi/shell/commands/DeployDefinition.java | 183 +++ .../resources/OSGI-INF/blueprint/blueprint.xml | 15 +- 8 files changed, 225 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/510c524b/api/src/main/java/org/apache/unomi/api/services/ProfileService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/ProfileService.java b/api/src/main/java/org/apache/unomi/api/services/ProfileService.java index 028cc89..bc86c70 100644 --- a/api/src/main/java/org/apache/unomi/api/services/ProfileService.java +++ b/api/src/main/java/org/apache/unomi/api/services/ProfileService.java @@ -21,6 +21,7 @@ import org.apache.unomi.api.*; import org.apache.unomi.api.conditions.Condition; import org.apache.unomi.api.query.Query; +import java.net.URL; import java.util.*; /** @@ -312,6 +313,14 @@ public interface ProfileService { boolean setPropertyType(PropertyType property); /** + * This function will try to set the target on the property type if not set already, based on the file URL + * + * @param predefinedPropertyTypeURL + * @param propertyType + */ +void setPropertyTypeTarget(URL predefinedPropertyTypeURL, PropertyType propertyType); + +/** * Deletes the property type identified by the specified identifier. * * TODO: move to a different class http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/510c524b/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java -- diff --git a/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java index b5f8166..3392522 100644 --- a/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java +++ b/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java @@ -132,7 +132,7 @@ public class DefinitionsServiceImpl implements DefinitionsService, SynchronousBu try { ConditionType conditionType = CustomObjectMapper.getObjectMapper().readValue(predefinedConditionURL, ConditionType.class); // Register only if condition type does not exist yet -if (getConditionType(conditionType.getMetadata().getId()) == null) { +if (getConditionType(conditionType.getMetadata().getId()) == null || bundleContext.getBundle().getVersion().toString().contains("SNAPSHOT")) { setConditionType(conditionType); logger.info("Predefined condition type with id {} registered", conditionType.getMetadata().getId()); } else { @@ -157,7 +157,7 @@ public class DefinitionsServiceImpl implements DefinitionsService, SynchronousBu try { ActionType actionType = CustomObjectMapper.getObjectMapper().readValue(predefinedActionURL, ActionType.class); // Register only if action type does not exist yet -if (getActionType(actionType.getMetadata().getId()) == null) { +if (getActionType(actionType.getMetadata().getId()) == null || bundleContext.getBundle().getVersion().toString().contains("SNAPSHOT")) { setActionType(actionType); logger.info("Predefined action type with id {} registered", actionType.getMetadata().getId()); } else { http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/510c524b/services/src/main/java/org/apache/un
incubator-unomi git commit: UNOMI-177 update population variable type to Long instead of Integer The max value holding by this types: * Integer: 2^31-1 ~= 2147483647 * Long: 2^63-1 ~= 9223372036854775
Repository: incubator-unomi Updated Branches: refs/heads/master a4a644403 -> 70fe6640c UNOMI-177 update population variable type to Long instead of Integer The max value holding by this types: * Integer: 2^31-1 ~= 2147483647 * Long:2^63-1 ~= 9223372036854775807 So we must use the Long class type to wrap the value of population Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/70fe6640 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/70fe6640 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/70fe6640 Branch: refs/heads/master Commit: 70fe6640c401dfdadef8d9e42469fd63617e9223 Parents: a4a6444 Author: Taybou Authored: Mon Apr 23 14:22:15 2018 +0200 Committer: Taybou Committed: Mon Apr 23 14:22:15 2018 +0200 -- .../org/apache/unomi/geonames/services/GeonameEntry.java | 8 .../apache/unomi/geonames/services/GeonamesServiceImpl.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/70fe6640/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonameEntry.java -- diff --git a/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonameEntry.java b/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonameEntry.java index ac41a6e..36f4f0b 100644 --- a/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonameEntry.java +++ b/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonameEntry.java @@ -42,7 +42,7 @@ public class GeonameEntry extends Item { protected String admin2Code; protected String admin3Code; protected String admin4Code; -protected Integer population; +protected Long population; protected Integer elevation; protected String dem; protected String timezone; @@ -51,7 +51,7 @@ public class GeonameEntry extends Item { public GeonameEntry() { } -public GeonameEntry(String geonameId, String name, String asciiname, Double lat, Double lon, String featureClass, String featureCode, String countryCode, List cc2, String admin1Code, String admin2Code, String admin3Code, String admin4Code, Integer population, Integer elevation, String dem, String timezone, Date modificationDate) { +public GeonameEntry(String geonameId, String name, String asciiname, Double lat, Double lon, String featureClass, String featureCode, String countryCode, List cc2, String admin1Code, String admin2Code, String admin3Code, String admin4Code, Long population, Integer elevation, String dem, String timezone, Date modificationDate) { super(geonameId); this.name = name; this.asciiname = asciiname; @@ -170,11 +170,11 @@ public class GeonameEntry extends Item { this.admin4Code = admin4Code; } -public Integer getPopulation() { +public Long getPopulation() { return population; } -public void setPopulation(Integer population) { +public void setPopulation(Long population) { this.population = population; } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/70fe6640/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java -- diff --git a/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java b/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java index 9bce9b2..8817836 100644 --- a/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java +++ b/extensions/geonames/services/src/main/java/org/apache/unomi/geonames/services/GeonamesServiceImpl.java @@ -134,7 +134,7 @@ public class GeonamesServiceImpl implements GeonamesService { values[6], values[7], values[8], Arrays.asList(values[9].split(",")), values[10], values[11], values[12], values[13], -StringUtils.isEmpty(values[14]) ? null : Integer.parseInt(values[14]), +StringUtils.isEmpty(values[14]) ? null : Long.parseLong(values[14]), StringUtils.isEmpty(values[15]) ? null : Integer.parseInt(values[15]), values[16], values[17], sdf.parse(values[18]));
[4/4] incubator-unomi git commit: Correct resource bundle encoding for plugins-request module
Correct resource bundle encoding for plugins-request module Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/fbb36c83 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/fbb36c83 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/fbb36c83 Branch: refs/heads/master Commit: fbb36c838c0072aee0367dcdcd58c828b9ea5bde Parents: 04caa74 Author: Taybou Authored: Wed Mar 21 14:49:24 2018 +0100 Committer: Taybou Committed: Wed Mar 21 14:49:24 2018 +0100 -- .../src/main/resources/messages_fr.properties | 26 ++-- 1 file changed, 13 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/fbb36c83/plugins/request/src/main/resources/messages_fr.properties -- diff --git a/plugins/request/src/main/resources/messages_fr.properties b/plugins/request/src/main/resources/messages_fr.properties index 6dea992..6859b33 100644 --- a/plugins/request/src/main/resources/messages_fr.properties +++ b/plugins/request/src/main/resources/messages_fr.properties @@ -17,22 +17,22 @@ PROPERTIES_CITY_LABEL=Ville PROPERTIES_COUNTRYCODE_LABEL=Code pays PROPERTIES_COUNTRYNAME_LABEL=Pays -PROPERTIES_DEVICECATEGORY_LABEL=Cat�gorie d'appareil +PROPERTIES_DEVICECATEGORY_LABEL=Cat�gorie d'appareil PROPERTIES_LATITUDE_LABEL=Latitude PROPERTIES_LONGITUDE_LABEL=Longitude -PROPERTIES_OPERATINGSYSTEMFAMILY_LABEL=Type de syst�me d'exploitation -PROPERTIES_OPERATINGSYSTEMNAME_LABEL=Nom du syst�me d'exploitation +PROPERTIES_OPERATINGSYSTEMFAMILY_LABEL=Type de syst�me d'exploitation +PROPERTIES_OPERATINGSYSTEMNAME_LABEL=Nom du syst�me d'exploitation PROPERTIES_REMOTEADDR_LABEL=Adresse IP PROPERTIES_REMOTEHOST_LABEL=Nom de la machine PROPERTIES_USERAGENTNAME_LABEL=Navigateur PROPERTIES_USERAGENTVERSION_LABEL=Version du navigateur -action.requestHeaderToProfilePropertyAction.copyRequestHeader=Copier l'en-t�te de requ�te -action.requestHeaderToProfilePropertyAction.description=Copie un en-t�te de requ�te vers une propri�t� utilisateur -action.requestHeaderToProfilePropertyAction.name=Copier un en-t�te de requ�te vers une propri�t� utilisateur -action.requestHeaderToProfilePropertyAction.toProfileProperty=vers la propri�t� utilisateur -action.requestParameterToProfilePropertyAction.copyRequestParameter=Copier le param�tre de requ�te -action.requestParameterToProfilePropertyAction.description=Copie un param�tre de requ�te vers une propri�t� utilisateur -action.requestParameterToProfilePropertyAction.name=Copier un param�tre de requ�te vers une propri�t� utilisateur -action.setRemoteHostInfoAction.copyRemoteIpAndLocation=Copier l'adresse Internet/g�ographique du client dans la session -action.setRemoteHostInfoAction.description=Copier l'adresse Internet/g�ographique du client dans la session -action.setRemoteHostInfoAction.name=Copier l'adresse Internet/g�ographique dans la session +action.requestHeaderToProfilePropertyAction.copyRequestHeader=Copier l'en-t�te de requ�te +action.requestHeaderToProfilePropertyAction.description=Copie un en-t�te de requ�te vers une propri�t� utilisateur +action.requestHeaderToProfilePropertyAction.name=Copier un en-t�te de requ�te vers une propri�t� utilisateur +action.requestHeaderToProfilePropertyAction.toProfileProperty=vers la propri�t� utilisateur +action.requestParameterToProfilePropertyAction.copyRequestParameter=Copier le param�tre de requ�te +action.requestParameterToProfilePropertyAction.description=Copie un param�tre de requ�te vers une propri�t� utilisateur +action.requestParameterToProfilePropertyAction.name=Copier un param�tre de requ�te vers une propri�t� utilisateur +action.setRemoteHostInfoAction.copyRemoteIpAndLocation=Copier l'adresse Internet/g�ographique du client dans la session +action.setRemoteHostInfoAction.description=Copier l'adresse Internet/g�ographique du client dans la session +action.setRemoteHostInfoAction.name=Copier l'adresse Internet/g�ographique dans la session
[1/4] incubator-unomi git commit: Correct resource bundle encoding for plugins-base module
Repository: incubator-unomi Updated Branches: refs/heads/master 19ea6f488 -> fbb36c838 Correct resource bundle encoding for plugins-base module Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/d159be35 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/d159be35 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/d159be35 Branch: refs/heads/master Commit: d159be355d73cc7a1deb55c40d3582c531ae6efc Parents: 19ea6f4 Author: Taybou Authored: Wed Mar 21 14:29:47 2018 +0100 Committer: Taybou Committed: Wed Mar 21 14:29:47 2018 +0100 -- plugins/baseplugin/src/main/resources/messages_de.properties | 6 +++--- plugins/baseplugin/src/main/resources/messages_fr.properties | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d159be35/plugins/baseplugin/src/main/resources/messages_de.properties -- diff --git a/plugins/baseplugin/src/main/resources/messages_de.properties b/plugins/baseplugin/src/main/resources/messages_de.properties index 91372cf..26f5fcd 100644 --- a/plugins/baseplugin/src/main/resources/messages_de.properties +++ b/plugins/baseplugin/src/main/resources/messages_de.properties @@ -24,12 +24,12 @@ condition.eventTypeCondition.hasOccurred=ist aufgetreten. condition.eventTypeCondition.name=Ereignis condition.formEventCondition.name=Formularereignis condition.geoLocationByPointSessionCondition.latitude=Breite -condition.geoLocationByPointSessionCondition.longitude=L�nge +condition.geoLocationByPointSessionCondition.longitude=L�nge condition.geoLocationSessionCondition.country=Land condition.geoLocationSessionCondition.name=Geolocation nach Land -condition.goalMatchCondition.name=Ziel �bereinstimmung +condition.goalMatchCondition.name=Ziel �bereinstimmung condition.loginEventCondition.name=Anmelden Ereignis -condition.matchAllCondition.name=Erf�lle alle +condition.matchAllCondition.name=Erf�lle alle condition.newVisitorCondition.name=Neuer Besucher condition.newVisitorCondition.since=seit condition.notCondition.name=Nicht http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d159be35/plugins/baseplugin/src/main/resources/messages_fr.properties -- diff --git a/plugins/baseplugin/src/main/resources/messages_fr.properties b/plugins/baseplugin/src/main/resources/messages_fr.properties index 3a69009..5a964b8 100644 --- a/plugins/baseplugin/src/main/resources/messages_fr.properties +++ b/plugins/baseplugin/src/main/resources/messages_fr.properties @@ -15,6 +15,6 @@ # limitations under the License. # condition.booleanCondition.and=ET -condition.booleanCondition.description=Op�rateur ET/OU (logique) +condition.booleanCondition.description=Op�rateur ET/OU (logique) condition.booleanCondition.name=ET/OU condition.booleanCondition.or=OU
[3/4] incubator-unomi git commit: Correct resource bundle encoding for plugins-mail module
Correct resource bundle encoding for plugins-mail module Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/04caa74a Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/04caa74a Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/04caa74a Branch: refs/heads/master Commit: 04caa74ad36b98a43d0e4ca63d5ee56eb6995132 Parents: 4c7642c Author: Taybou Authored: Wed Mar 21 14:36:13 2018 +0100 Committer: Taybou Committed: Wed Mar 21 14:36:13 2018 +0100 -- plugins/mail/src/main/resources/messages_fr.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/04caa74a/plugins/mail/src/main/resources/messages_fr.properties -- diff --git a/plugins/mail/src/main/resources/messages_fr.properties b/plugins/mail/src/main/resources/messages_fr.properties index 6ceda33..445825c 100644 --- a/plugins/mail/src/main/resources/messages_fr.properties +++ b/plugins/mail/src/main/resources/messages_fr.properties @@ -14,11 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. # -action.sendMailAction.description=Envoyer un courier en utilisant un mod�le +action.sendMailAction.description=Envoyer un courier en utilisant un mod�le action.sendMailAction.emailPlaceholder=Saisir une adresse couriel ici... action.sendMailAction.from=De -action.sendMailAction.mailTemplate=Mod�le de couriel +action.sendMailAction.mailTemplate=Mod�le de couriel action.sendMailAction.name=Envoyer un couriel action.sendMailAction.subject=Sujet action.sendMailAction.subjectPlaceholder=Saisir le sujet du message ici... -action.sendMailAction.to=A +action.sendMailAction.to=A \ No newline at end of file
[2/4] incubator-unomi git commit: Correct resource bundle encoding for plugins-hover-event module
Correct resource bundle encoding for plugins-hover-event module Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/4c7642cb Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/4c7642cb Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/4c7642cb Branch: refs/heads/master Commit: 4c7642cb897ea237e975d99986096e189128e693 Parents: d159be3 Author: Taybou Authored: Wed Mar 21 14:32:39 2018 +0100 Committer: Taybou Committed: Wed Mar 21 14:32:39 2018 +0100 -- plugins/hover-event/src/main/resources/messages_fr.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/4c7642cb/plugins/hover-event/src/main/resources/messages_fr.properties -- diff --git a/plugins/hover-event/src/main/resources/messages_fr.properties b/plugins/hover-event/src/main/resources/messages_fr.properties index 06b46e6..76ed07e 100644 --- a/plugins/hover-event/src/main/resources/messages_fr.properties +++ b/plugins/hover-event/src/main/resources/messages_fr.properties @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -condition.hoverEventCondition.description=La souris est pass� par dessus un contenu -condition.hoverEventCondition.forContent=Ev�nement de survol d'un contenu avec l'id -condition.hoverEventCondition.name=Ev�nement de survol +condition.hoverEventCondition.description=La souris est pass�e par dessus un contenu +condition.hoverEventCondition.forContent=�v�nement de survol d'un contenu avec l'id +condition.hoverEventCondition.name=�v�nement de survol condition.hoverEventCondition.withPath=ou avec le chemin
incubator-unomi git commit: UNOMI-5 fix version after merge
Repository: incubator-unomi Updated Branches: refs/heads/master 082054139 -> e97686c37 UNOMI-5 fix version after merge Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/e97686c3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/e97686c3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/e97686c3 Branch: refs/heads/master Commit: e97686c37d0f340373318f7090bdd50aa4507552 Parents: 0820541 Author: dgaillard Authored: Thu Mar 8 14:52:46 2018 +0100 Committer: dgaillard Committed: Thu Mar 8 14:52:46 2018 +0100 -- api/pom.xml | 2 +- common/pom.xml | 2 +- extensions/geonames/pom.xml | 2 +- extensions/geonames/rest/pom.xml| 8 ++--- extensions/geonames/services/pom.xml| 8 ++--- extensions/lists-extension/actions/pom.xml | 8 ++--- extensions/lists-extension/pom.xml | 4 +-- extensions/lists-extension/rest/pom.xml | 8 ++--- extensions/lists-extension/services/pom.xml | 8 ++--- extensions/pom.xml | 2 +- extensions/privacy-extension/pom.xml| 4 +-- extensions/privacy-extension/rest/pom.xml | 8 ++--- extensions/privacy-extension/services/pom.xml | 8 ++--- extensions/router/pom.xml | 2 +- extensions/router/router-api/pom.xml| 2 +- extensions/router/router-core/pom.xml | 2 +- extensions/router/router-karaf-feature/pom.xml | 2 +- extensions/router/router-rest/pom.xml | 2 +- extensions/router/router-service/pom.xml| 2 +- extensions/salesforce-connector/actions/pom.xml | 6 ++-- .../salesforce-connector/karaf-kar/pom.xml | 10 +++--- extensions/salesforce-connector/pom.xml | 2 +- extensions/salesforce-connector/rest/pom.xml| 8 ++--- .../salesforce-connector/services/pom.xml | 6 ++-- extensions/unomi-mailchimp/actions/pom.xml | 2 +- extensions/unomi-mailchimp/karaf-kar/pom.xml| 2 +- extensions/unomi-mailchimp/pom.xml | 2 +- extensions/unomi-mailchimp/rest/pom.xml | 2 +- extensions/unomi-mailchimp/services/pom.xml | 2 +- extensions/weather-update/core/pom.xml | 2 +- extensions/weather-update/karaf-kar/pom.xml | 4 +-- extensions/weather-update/pom.xml | 2 +- itests/pom.xml | 2 +- kar/pom.xml | 38 ++-- lifecycle-watcher/pom.xml | 2 +- metrics/pom.xml | 6 ++-- package/pom.xml | 6 ++-- performance-tests/pom.xml | 2 +- persistence-elasticsearch/core/pom.xml | 8 ++--- persistence-elasticsearch/pom.xml | 2 +- persistence-spi/pom.xml | 4 +-- plugins/baseplugin/pom.xml | 6 ++-- plugins/hover-event/pom.xml | 4 +-- plugins/mail/pom.xml| 4 +-- plugins/optimization-test/pom.xml | 2 +- plugins/past-event/pom.xml | 6 ++-- plugins/pom.xml | 4 +-- plugins/request/pom.xml | 2 +- plugins/tracked-event/pom.xml | 6 ++-- pom.xml | 2 +- rest/pom.xml| 6 ++-- samples/login-integration/pom.xml | 4 +-- samples/pom.xml | 2 +- samples/trainingplugin/pom.xml | 4 +-- samples/tweet-button-plugin/pom.xml | 4 +-- services/pom.xml| 8 ++--- tools/pom.xml | 2 +- tools/shell-commands/pom.xml| 2 +- tools/shell-dev-commands/pom.xml| 8 ++--- wab/pom.xml | 6 ++-- 60 files changed, 143 insertions(+), 143 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e97686c3/api/pom.xml -- diff --git a/api/pom.xml b/api/pom.xml index d914b3a..3ad25fb 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -22,7 +22,7 @@ org.apache.unomi unomi-root -1.3.0-incubating-unomi_5_karaf4_1-SNAPSHOT +1.3.0-incubating-SNAPSHOT unomi-api http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e97686c3/common/pom.xml -- diff --git a/common/pom.xml b/common/pom.xml index 9cfd
incubator-unomi git commit: replace version number with project.version
Repository: incubator-unomi Updated Branches: refs/heads/master d8bbbfaa4 -> a4c60993d replace version number with project.version Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/a4c60993 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/a4c60993 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/a4c60993 Branch: refs/heads/master Commit: a4c60993d49d4dcb99bf4aad88bd3156ff9f7784 Parents: d8bbbfa Author: dgaillard Authored: Thu Mar 1 15:29:38 2018 +0100 Committer: dgaillard Committed: Thu Mar 1 15:29:38 2018 +0100 -- extensions/unomi-mailchimp/karaf-kar/src/main/feature/feature.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/a4c60993/extensions/unomi-mailchimp/karaf-kar/src/main/feature/feature.xml -- diff --git a/extensions/unomi-mailchimp/karaf-kar/src/main/feature/feature.xml b/extensions/unomi-mailchimp/karaf-kar/src/main/feature/feature.xml index 6f5a512..5faa7bc 100644 --- a/extensions/unomi-mailchimp/karaf-kar/src/main/feature/feature.xml +++ b/extensions/unomi-mailchimp/karaf-kar/src/main/feature/feature.xml @@ -19,7 +19,7 @@ Connect Apache Unomi to MailChimp API -mvn:org.apache.unomi/unomi-mailchimp-connector-services/1.3.0-incubating-SNAPSHOT/cfg/mailchimpconnectorcfg +mvn:org.apache.unomi/unomi-mailchimp-connector-services/${project.version}/cfg/mailchimpconnectorcfg mvn:org.apache.unomi/unomi-mailchimp-connector-services/${project.version} mvn:org.apache.unomi/unomi-mailchimp-connector-rest/${project.version} mvn:org.apache.unomi/unomi-mailchimp-connector-actions/${project.version}
incubator-unomi git commit: UNOMI-159 add test to avoid double load on startup
Repository: incubator-unomi Updated Branches: refs/heads/master 244f0a490 -> 737741476 UNOMI-159 add test to avoid double load on startup Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/73774147 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/73774147 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/73774147 Branch: refs/heads/master Commit: 73774147696a9f2141494d5025c575e3ea1d7760 Parents: 244f0a4 Author: dgaillard Authored: Tue Feb 27 15:59:48 2018 +0100 Committer: dgaillard Committed: Tue Feb 27 15:59:48 2018 +0100 -- .../unomi/router/services/AbstractConfigurationServiceImpl.java| 2 +- .../apache/unomi/router/services/AbstractCustomServiceImpl.java| 2 +- .../org/apache/unomi/services/services/DefinitionsServiceImpl.java | 2 +- .../java/org/apache/unomi/services/services/GoalsServiceImpl.java | 2 +- .../org/apache/unomi/services/services/ProfileServiceImpl.java | 2 +- .../java/org/apache/unomi/services/services/RulesServiceImpl.java | 2 +- .../org/apache/unomi/services/services/SegmentServiceImpl.java | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/73774147/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/AbstractConfigurationServiceImpl.java -- diff --git a/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/AbstractConfigurationServiceImpl.java b/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/AbstractConfigurationServiceImpl.java index 09b1d37..68011eb 100644 --- a/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/AbstractConfigurationServiceImpl.java +++ b/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/AbstractConfigurationServiceImpl.java @@ -53,7 +53,7 @@ public abstract class AbstractConfigurationServiceImpl implements SynchronousBun processBundleStartup(bundleContext); for (Bundle bundle : bundleContext.getBundles()) { -if (bundle.getBundleContext() != null) { +if (bundle.getBundleContext() != null && bundle.getBundleId() != bundleContext.getBundle().getBundleId()) { processBundleStartup(bundle.getBundleContext()); } } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/73774147/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/AbstractCustomServiceImpl.java -- diff --git a/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/AbstractCustomServiceImpl.java b/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/AbstractCustomServiceImpl.java index 4e36141..dc06fff 100644 --- a/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/AbstractCustomServiceImpl.java +++ b/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/AbstractCustomServiceImpl.java @@ -47,7 +47,7 @@ public class AbstractCustomServiceImpl implements SynchronousBundleListener { processBundleStartup(bundleContext); for (Bundle bundle : bundleContext.getBundles()) { -if (bundle.getBundleContext() != null) { +if (bundle.getBundleContext() != null && bundle.getBundleId() != bundleContext.getBundle().getBundleId()) { processBundleStartup(bundle.getBundleContext()); } } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/73774147/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java -- diff --git a/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java index 478e11f..9f3c11c 100644 --- a/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java +++ b/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java @@ -70,7 +70,7 @@ public class DefinitionsServiceImpl implements DefinitionsService, SynchronousBu // process already started bundles for (Bundle bundle : bundleContext.getBundles()) { -if (bundle.getBundleContext() != null) { +if (bundle.getBundleContext() != null && bundle.getBundleId() != bundleContext.getBundle().getBundleId()) { processBundleStartup(bundle.getBundleContext());
incubator-unomi git commit: UNOMI-153 add static string for event ID
Repository: incubator-unomi Updated Branches: refs/heads/master 33ecebff2 -> 244f0a490 UNOMI-153 add static string for event ID Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/244f0a49 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/244f0a49 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/244f0a49 Branch: refs/heads/master Commit: 244f0a490faa9180d0f708bef04dcab4aac6c012 Parents: 33ecebf Author: dgaillard Authored: Tue Feb 27 15:07:37 2018 +0100 Committer: dgaillard Committed: Tue Feb 27 15:07:37 2018 +0100 -- .../unomi/router/core/context/RouterCamelContext.java | 10 +++--- .../router/core/event/UpdateCamelRouteEventHandler.java | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/244f0a49/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/context/RouterCamelContext.java -- diff --git a/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/context/RouterCamelContext.java b/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/context/RouterCamelContext.java index 03b2e04..309d27a 100644 --- a/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/context/RouterCamelContext.java +++ b/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/context/RouterCamelContext.java @@ -74,6 +74,10 @@ public class RouterCamelContext implements SynchronousBundleListener, IRouterCam private ConfigSharingService configSharingService; private ClusterService clusterService; +public static String EVENT_ID_REMOVE = "org.apache.unomi.router.event.remove"; +public static String EVENT_ID_IMPORT = "org.apache.unomi.router.event.import"; +public static String EVENT_ID_EXPORT = "org.apache.unomi.router.event.export"; + public void setExecHistorySize(String execHistorySize) { this.execHistorySize = execHistorySize; } @@ -180,7 +184,7 @@ public class RouterCamelContext implements SynchronousBundleListener, IRouterCam } if (fireEvent) { -UpdateCamelRouteEvent event = new UpdateCamelRouteEvent("org.apache.unomi.router.event.remove"); +UpdateCamelRouteEvent event = new UpdateCamelRouteEvent(EVENT_ID_REMOVE); event.setRouteId(routeId); clusterService.sendEvent(event); } @@ -208,7 +212,7 @@ public class RouterCamelContext implements SynchronousBundleListener, IRouterCam camelContext.addRoutes(builder); if (fireEvent) { -UpdateCamelRouteEvent event = new UpdateCamelRouteEvent("org.apache.unomi.router.event.import"); +UpdateCamelRouteEvent event = new UpdateCamelRouteEvent(EVENT_ID_IMPORT); event.setConfiguration(importConfiguration); clusterService.sendEvent(event); } @@ -229,7 +233,7 @@ public class RouterCamelContext implements SynchronousBundleListener, IRouterCam camelContext.addRoutes(profileExportCollectRouteBuilder); if (fireEvent) { -UpdateCamelRouteEvent event = new UpdateCamelRouteEvent("org.apache.unomi.router.event.export"); +UpdateCamelRouteEvent event = new UpdateCamelRouteEvent(EVENT_ID_EXPORT); event.setConfiguration(exportConfiguration); clusterService.sendEvent(event); } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/244f0a49/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/event/UpdateCamelRouteEventHandler.java -- diff --git a/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/event/UpdateCamelRouteEventHandler.java b/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/event/UpdateCamelRouteEventHandler.java index 6760f4c..c752072 100644 --- a/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/event/UpdateCamelRouteEventHandler.java +++ b/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/event/UpdateCamelRouteEventHandler.java @@ -47,9 +47,9 @@ public class UpdateCamelRouteEventHandler extends CellarSupport implements Event try { logger.debug("Event id is {}", event.getId()); -if (event.getId().equals("org.apache.unomi.router.event.remove") && StringUtils.isNotBlank(event.getRouteId())) { +if (event.get
incubator-unomi git commit: UNOMI-153 use send event method to send other event
Repository: incubator-unomi Updated Branches: refs/heads/master bd34ae9e0 -> 33ecebff2 UNOMI-153 use send event method to send other event Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/33ecebff Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/33ecebff Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/33ecebff Branch: refs/heads/master Commit: 33ecebff21adb0abd01afe433566214211488627 Parents: bd34ae9 Author: dgaillard Authored: Tue Feb 27 14:34:09 2018 +0100 Committer: dgaillard Committed: Tue Feb 27 14:34:09 2018 +0100 -- .../apache/unomi/services/services/ClusterServiceImpl.java| 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/33ecebff/services/src/main/java/org/apache/unomi/services/services/ClusterServiceImpl.java -- diff --git a/services/src/main/java/org/apache/unomi/services/services/ClusterServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/ClusterServiceImpl.java index 163812d..65d6095 100644 --- a/services/src/main/java/org/apache/unomi/services/services/ClusterServiceImpl.java +++ b/services/src/main/java/org/apache/unomi/services/services/ClusterServiceImpl.java @@ -147,8 +147,7 @@ public class ClusterServiceImpl implements ClusterService { configurations.put(KARAF_CELLAR_CLUSTER_NODE_CONFIGURATION, karafCellarClusterNodeConfiguration); ClusterConfigurationEvent clusterConfigurationEvent = new ClusterConfigurationEvent(KARAF_CELLAR_CLUSTER_NODE_CONFIGURATION); -clusterConfigurationEvent.setSourceGroup(group); -karafCellarEventProducer.produce(clusterConfigurationEvent); +sendEvent(clusterConfigurationEvent); } nodeStatisticsUpdateTimer = new Timer(); @@ -303,8 +302,6 @@ public class ClusterServiceImpl implements ClusterService { double systemLoadAverage = operatingSystemMXBean.getSystemLoadAverage(); ClusterSystemStatisticsEvent clusterSystemStatisticsEvent = new ClusterSystemStatisticsEvent("org.apache.unomi.cluster.system.statistics"); -clusterSystemStatisticsEvent.setSourceGroup(group); - clusterSystemStatisticsEvent.setSourceNode(karafCellarClusterManager.getNode()); Map systemStatistics = new TreeMap<>(); ArrayList systemLoadAverageArray = new ArrayList<>(); systemLoadAverageArray.add(systemLoadAverage); @@ -313,7 +310,7 @@ public class ClusterServiceImpl implements ClusterService { systemStatistics.put("uptime", uptime); clusterSystemStatisticsEvent.setStatistics(systemStatistics); nodeSystemStatistics.put(karafCellarClusterManager.getNode().getId(), systemStatistics); -karafCellarEventProducer.produce(clusterSystemStatisticsEvent); +sendEvent(clusterSystemStatisticsEvent); } }
incubator-unomi git commit: UNOMI-153 add event when updating camel route (remove, add or update) to make sure route are synchronize in the cluster
Repository: incubator-unomi Updated Branches: refs/heads/master f84401a7a -> bd34ae9e0 UNOMI-153 add event when updating camel route (remove, add or update) to make sure route are synchronize in the cluster Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/bd34ae9e Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/bd34ae9e Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/bd34ae9e Branch: refs/heads/master Commit: bd34ae9e0d3e6101a9aeb5a0988b3c0c099bbf97 Parents: f84401a Author: dgaillard Authored: Mon Feb 26 17:48:46 2018 +0100 Committer: dgaillard Committed: Mon Feb 26 17:48:46 2018 +0100 -- .../unomi/api/services/ClusterService.java | 8 +++ .../unomi/router/api/IRouterCamelContext.java | 4 +- extensions/router/router-core/pom.xml | 10 +++ .../router/core/context/RouterCamelContext.java | 42 --- .../core/event/UpdateCamelRouteEvent.java | 47 + .../event/UpdateCamelRouteEventHandler.java | 74 .../resources/OSGI-INF/blueprint/blueprint.xml | 17 + .../ExportConfigurationServiceImpl.java | 4 +- .../ImportConfigurationServiceImpl.java | 4 +- .../services/services/ClusterServiceImpl.java | 9 +++ 10 files changed, 204 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/bd34ae9e/api/src/main/java/org/apache/unomi/api/services/ClusterService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/ClusterService.java b/api/src/main/java/org/apache/unomi/api/services/ClusterService.java index b851b78..9a0fdfa 100644 --- a/api/src/main/java/org/apache/unomi/api/services/ClusterService.java +++ b/api/src/main/java/org/apache/unomi/api/services/ClusterService.java @@ -19,6 +19,7 @@ package org.apache.unomi.api.services; import org.apache.unomi.api.ClusterNode; +import java.io.Serializable; import java.util.Date; import java.util.List; @@ -49,4 +50,11 @@ public interface ClusterService { */ void purge(final String scope); +/** + * This function will send an event to the nodes of the cluster + * The function takes a Serializable to avoid dependency on any clustering framework + * + * @param event this object will be cast to {@link org.apache.karaf.cellar.core.event.Event} + */ +void sendEvent(Serializable event); } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/bd34ae9e/extensions/router/router-api/src/main/java/org/apache/unomi/router/api/IRouterCamelContext.java -- diff --git a/extensions/router/router-api/src/main/java/org/apache/unomi/router/api/IRouterCamelContext.java b/extensions/router/router-api/src/main/java/org/apache/unomi/router/api/IRouterCamelContext.java index d2d3249..8775b43 100644 --- a/extensions/router/router-api/src/main/java/org/apache/unomi/router/api/IRouterCamelContext.java +++ b/extensions/router/router-api/src/main/java/org/apache/unomi/router/api/IRouterCamelContext.java @@ -21,7 +21,7 @@ package org.apache.unomi.router.api; */ public interface IRouterCamelContext { -void killExistingRoute(String routeId) throws Exception; +void killExistingRoute(String routeId, boolean fireEvent) throws Exception; -void updateProfileReaderRoute(Object configuration) throws Exception; +void updateProfileReaderRoute(Object configuration, boolean fireEvent) throws Exception; } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/bd34ae9e/extensions/router/router-core/pom.xml -- diff --git a/extensions/router/router-core/pom.xml b/extensions/router/router-core/pom.xml index 42e10dc..d393e3b 100644 --- a/extensions/router/router-core/pom.xml +++ b/extensions/router/router-core/pom.xml @@ -137,6 +137,16 @@ 0.10.1.0 provided + +org.apache.karaf.cellar +org.apache.karaf.cellar.core +provided + + +org.apache.karaf.cellar +org.apache.karaf.cellar.config +provided + http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/bd34ae9e/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/context/RouterCamelContext.java -- diff --git a/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/context/RouterCamelContext.java b/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/context/RouterCamelContext.java in
incubator-unomi git commit: UNOMI-156 add error message instead of logger
Repository: incubator-unomi Updated Branches: refs/heads/master e93fab06a -> 9bf0ebf90 UNOMI-156 add error message instead of logger Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/9bf0ebf9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/9bf0ebf9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/9bf0ebf9 Branch: refs/heads/master Commit: 9bf0ebf905e037598bed16030c90c978b8991979 Parents: e93fab0 Author: dgaillard Authored: Wed Feb 21 11:21:50 2018 +0100 Committer: dgaillard Committed: Wed Feb 21 11:21:50 2018 +0100 -- .../main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/9bf0ebf9/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java -- diff --git a/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java b/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java index c6a5a5d..cb332df 100644 --- a/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java +++ b/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java @@ -453,10 +453,9 @@ public class ProfileServiceEndPoint { */ @GET @Path("/existingProperties") -public Collection getExistingProperties(@QueryParam("tag") String tag, @QueryParam("isSystemTag") boolean isSystemTag, @QueryParam("itemType") String itemType, @HeaderParam("Accept-Language") String language, @Context final HttpServletResponse response) { +public Collection getExistingProperties(@QueryParam("tag") String tag, @QueryParam("isSystemTag") boolean isSystemTag, @QueryParam("itemType") String itemType, @HeaderParam("Accept-Language") String language, @Context final HttpServletResponse response) throws IOException { if (StringUtils.isBlank(tag) || StringUtils.isBlank(itemType)) { -logger.error("Missing mandatory query parameters when requesting /cxs/profiles/existingProperties, mandatory query parameters are tag and itemType"); -response.setStatus(Response.Status.BAD_REQUEST.getStatusCode()); +response.sendError(Response.Status.BAD_REQUEST.getStatusCode(), "Missing mandatory query parameters when requesting /cxs/profiles/existingProperties, mandatory query parameters are tag and itemType"); return null; } Set properties;
incubator-unomi git commit: UNOMI-155 fix typo
Repository: incubator-unomi Updated Branches: refs/heads/master 769129894 -> e93fab06a UNOMI-155 fix typo Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/e93fab06 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/e93fab06 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/e93fab06 Branch: refs/heads/master Commit: e93fab06a7f999b4dad62705b6e0eb7fad9cf2ee Parents: 7691298 Author: dgaillard Authored: Wed Feb 21 11:01:31 2018 +0100 Committer: dgaillard Committed: Wed Feb 21 11:01:42 2018 +0100 -- .../org/apache/unomi/services/services/ProfileServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e93fab06/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 ffd62eb..fedc3e9 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 @@ -842,7 +842,7 @@ public class ProfileServiceImpl implements ProfileService, SynchronousBundleList } logger.info("Predefined persona with id {} registered", itemId); } else { -logger.info("The predefined persona with id {} is already registered, this persona type will be skipped", itemId); +logger.info("The predefined persona with id {} is already registered, this persona will be skipped", itemId); } } catch (IOException e) { logger.error("Error while loading persona " + predefinedPersonaURL, e);
incubator-unomi git commit: UNOMI-166 leverage StringUtils
Repository: incubator-unomi Updated Branches: refs/heads/master 53ea767d0 -> 84c8ec8a0 UNOMI-166 leverage StringUtils Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/84c8ec8a Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/84c8ec8a Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/84c8ec8a Branch: refs/heads/master Commit: 84c8ec8a09ba24dde705e727722b8f8d1d796197 Parents: 53ea767 Author: dgaillard Authored: Mon Feb 19 15:26:49 2018 +0100 Committer: dgaillard Committed: Mon Feb 19 15:26:58 2018 +0100 -- .../elasticsearch/ElasticSearchPersistenceServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/84c8ec8a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java -- diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java index 761c757..d5fa185 100644 --- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java +++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java @@ -282,7 +282,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService, public void setItemClassesToCache(String itemClassesToCache) { this.itemClassesToCache = itemClassesToCache; -if (itemClassesToCache != null && itemClassesToCache.trim().length() > 0) { +if (StringUtils.isNotBlank(itemClassesToCache)) { String[] itemClassesToCacheParts = itemClassesToCache.split(","); if (itemClassesToCacheParts != null) { itemClassesToCacheSet.clear();
incubator-unomi git commit: UNOMI-162 leverage StringUtils
Repository: incubator-unomi Updated Branches: refs/heads/master 162660191 -> 384ed0262 UNOMI-162 leverage StringUtils Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/384ed026 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/384ed026 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/384ed026 Branch: refs/heads/master Commit: 384ed026206e6b4c6baa974f843df444342417d1 Parents: 1626601 Author: dgaillard Authored: Mon Feb 19 14:46:51 2018 +0100 Committer: dgaillard Committed: Mon Feb 19 14:46:51 2018 +0100 -- .../elasticsearch/ElasticSearchPersistenceServiceImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/384ed026/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java -- diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java index 3dfcc2d..761c757 100644 --- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java +++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java @@ -324,8 +324,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService, Settings.Builder transportSettings = Settings.builder() .put(CLUSTER_NAME, clusterName); -if (transportClientClassName != null && transportClientClassName.trim().length() > 0 && -transportClientJarDirectory != null && transportClientJarDirectory.trim().length() > 0) { +if (StringUtils.isNotBlank(transportClientClassName) && StringUtils.isNotBlank(transportClientJarDirectory)) { logger.info("Connecting to ElasticSearch persistence backend using transport class " + transportClientClassName + " with JAR directory "+transportClientJarDirectory + " using cluster name " + clusterName + " and index name " + indexName + "..."); @@ -1843,7 +1842,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService, ChildFirstClassLoader childFirstClassLoader = new ChildFirstClassLoader(this.getClass().getClassLoader(), urls.toArray(new URL[urls.size()])); -if (transportClientProperties != null && transportClientProperties.trim().length() > 0) { +if (StringUtils.isNotBlank(transportClientProperties)) { String[] clientProperties = transportClientProperties.split(","); if (clientProperties.length > 0) { for (String clientProperty : clientProperties) {
incubator-unomi git commit: UNOMI-156 add test on entry point existingProperties and return bad request if missing mandatory query parameters
Repository: incubator-unomi Updated Branches: refs/heads/master b356c2ff9 -> 2fba338c1 UNOMI-156 add test on entry point existingProperties and return bad request if missing mandatory query parameters Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/2fba338c Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/2fba338c Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/2fba338c Branch: refs/heads/master Commit: 2fba338c14d2ee009826110a3c92b5caca1921b1 Parents: b356c2f Author: dgaillard Authored: Thu Feb 15 15:13:51 2018 +0100 Committer: dgaillard Committed: Thu Feb 15 15:13:51 2018 +0100 -- rest/pom.xml | 5 + .../org/apache/unomi/rest/ProfileServiceEndPoint.java | 10 +- 2 files changed, 14 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/2fba338c/rest/pom.xml -- diff --git a/rest/pom.xml b/rest/pom.xml index 6096b9a..50232bf 100644 --- a/rest/pom.xml +++ b/rest/pom.xml @@ -87,6 +87,11 @@ 1.3.0-incubating-SNAPSHOT provided + +commons-lang +commons-lang +2.6 +
incubator-unomi git commit: UNOMI-155 Add loggers to improve feedback when registering definitions (rules, actions, etc)
Repository: incubator-unomi Updated Branches: refs/heads/master a38c2c086 -> b356c2ff9 UNOMI-155 Add loggers to improve feedback when registering definitions (rules, actions, etc) Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/b356c2ff Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/b356c2ff Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/b356c2ff Branch: refs/heads/master Commit: b356c2ff96d667db176cc217e79ee3fdf48c0f79 Parents: a38c2c0 Author: dgaillard Authored: Thu Feb 15 15:12:40 2018 +0100 Committer: dgaillard Committed: Thu Feb 15 15:12:40 2018 +0100 -- .../services/services/DefinitionsServiceImpl.java | 6 ++ .../unomi/services/services/GoalsServiceImpl.java | 8 .../services/services/ProfileServiceImpl.java | 18 +- .../unomi/services/services/RulesServiceImpl.java | 4 .../services/services/SegmentServiceImpl.java | 8 5 files changed, 39 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b356c2ff/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java -- diff --git a/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java index d35288d..478e11f 100644 --- a/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java +++ b/services/src/main/java/org/apache/unomi/services/services/DefinitionsServiceImpl.java @@ -133,6 +133,9 @@ public class DefinitionsServiceImpl implements DefinitionsService, SynchronousBu // Register only if condition type does not exist yet if (getConditionType(conditionType.getMetadata().getId()) == null) { setConditionType(conditionType); +logger.info("Predefined condition type with id {} registered", conditionType.getMetadata().getId()); +} else { +logger.info("The predefined condition type with id {} is already registered, this condition type will be skipped", conditionType.getMetadata().getId()); } } catch (IOException e) { logger.error("Error while loading condition definition " + predefinedConditionURL, e); @@ -155,6 +158,9 @@ public class DefinitionsServiceImpl implements DefinitionsService, SynchronousBu // Register only if action type does not exist yet if (getActionType(actionType.getMetadata().getId()) == null) { setActionType(actionType); +logger.info("Predefined action type with id {} registered", actionType.getMetadata().getId()); +} else { +logger.info("The predefined action type with id {} is already registered, this action type will be skipped", actionType.getMetadata().getId()); } } catch (Exception e) { logger.error("Error while loading action definition " + predefinedActionURL, e); http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b356c2ff/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java -- diff --git a/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java index 8da8721..1323cbe 100644 --- a/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java +++ b/services/src/main/java/org/apache/unomi/services/services/GoalsServiceImpl.java @@ -118,8 +118,12 @@ public class GoalsServiceImpl implements GoalsService, SynchronousBundleListener if (goal.getMetadata().getScope() == null) { goal.getMetadata().setScope("systemscope"); } +// Register only if goal does not exist yet if (getGoal(goal.getMetadata().getId()) == null) { setGoal(goal); +logger.info("Predefined goal with id {} registered", goal.getMetadata().getId()); +} else { +logger.info("The predefined goal with id {} is already registered, this goal will be skipped", goal.getMetadata().getId()); } } catch (IOException e) { logger.error("Error while loading segment definition " + predefinedGoalURL, e); @@ -259,8 +263,12
[2/2] incubator-unomi git commit: This closes pull request number #49
This closes pull request number #49 Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/a38c2c08 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/a38c2c08 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/a38c2c08 Branch: refs/heads/master Commit: a38c2c086b8f837e67c2482c90c4b1d6af981dde Parents: cac08f5 408e2d5 Author: dgaillard Authored: Wed Feb 14 13:51:25 2018 +0100 Committer: dgaillard Committed: Wed Feb 14 13:51:25 2018 +0100 -- .../elasticsearch/ElasticSearchPersistenceServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --
[1/2] incubator-unomi git commit: UNOMI-152 Fix monthly index New Year's bug
Repository: incubator-unomi Updated Branches: refs/heads/master cac08f5f9 -> a38c2c086 UNOMI-152 Fix monthly index New Year's bug When formatting the date around new year's day, retrieving WEEK_YEAR can yield next year or previous year as result. We should simply use YEAR. More details: https://stackoverflow.com/questions/8686331/y-returns-2012-while-y-returns-2011-in-simpledateformat Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/408e2d55 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/408e2d55 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/408e2d55 Branch: refs/heads/master Commit: 408e2d55586a8a9756e33b63cb814733c893459b Parents: 2ca6dc6 Author: Jarek Lipski Authored: Tue Feb 13 15:34:01 2018 +0100 Committer: Jarek Lipski Committed: Tue Feb 13 15:52:30 2018 +0100 -- .../elasticsearch/ElasticSearchPersistenceServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/408e2d55/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java -- diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java index 933724e..8a20f95 100644 --- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java +++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java @@ -506,7 +506,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService, } private String getMonthlyIndexName(Date date) { -String d = new SimpleDateFormat("--MM").format(date); +String d = new SimpleDateFormat("--MM").format(date); String monthlyIndexName = indexName + d; return monthlyIndexName; }
incubator-unomi git commit: Add comment to cfg file to explain property
Repository: incubator-unomi Updated Branches: refs/heads/master 775337269 -> d80662689 Add comment to cfg file to explain 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/d8066268 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/d8066268 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/d8066268 Branch: refs/heads/master Commit: d806626894612397d86da4e1cb7ec395188d40cb Parents: 7753372 Author: dgaillard Authored: Tue Jan 30 17:19:06 2018 +0100 Committer: dgaillard Committed: Tue Jan 30 17:19:06 2018 +0100 -- .../src/main/resources/org.apache.unomi.mailchimpconnector.cfg | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d8066268/extensions/unomi-mailchimp/services/src/main/resources/org.apache.unomi.mailchimpconnector.cfg -- diff --git a/extensions/unomi-mailchimp/services/src/main/resources/org.apache.unomi.mailchimpconnector.cfg b/extensions/unomi-mailchimp/services/src/main/resources/org.apache.unomi.mailchimpconnector.cfg index 89b58bf..d0c2c0c 100644 --- a/extensions/unomi-mailchimp/services/src/main/resources/org.apache.unomi.mailchimpconnector.cfg +++ b/extensions/unomi-mailchimp/services/src/main/resources/org.apache.unomi.mailchimpconnector.cfg @@ -22,4 +22,5 @@ mailChimpConnector.url.subDomain=us16 # unomiId<=>mcTagName # The following is a complete example of mapping if you wish to use it please make sure to create/replace MailChimp tag name mailChimpConnector.list.merge-fields.mapping=firstName<=>FNAME,lastName<=>LNAME,company<=>COMPANY,phoneNumber<=>PHONE,jobTitle<=>JOBTITLE,address<=>ADDRESS<=>addr1,city<=>ADDRESS<=>city,zipCode<=>ADDRESS<=>zip,countryName<=>ADDRESS<=>country,birthDate<=>BIRTHDATE,income<=>NUMBER +# If you wish you can stop the mapping by setting the following property to false mailChimpConnector.list.merge-fields.activate=true
[1/3] incubator-unomi git commit: Change mandatory properties, refactor the isMemberOfMailChimpList function, using the email hash of the visitor instead email
Repository: incubator-unomi Updated Branches: refs/heads/master 19f5f7ad2 -> 775337269 Change mandatory properties, refactor the isMemberOfMailChimpList function, using the email hash of the visitor instead email Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/e7b09794 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/e7b09794 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/e7b09794 Branch: refs/heads/master Commit: e7b09794cb11e95e79f06e854761bbce1a45870c Parents: 19f5f7a Author: Dinesh Authored: Wed Jan 24 10:44:06 2018 +0100 Committer: Dinesh Committed: Wed Jan 24 10:44:06 2018 +0100 -- extensions/unomi-mailchimp/README.md| 15 +- .../unomi/mailchimp/services/HttpUtils.java | 36 +++-- .../services/internal/MailChimpServiceImpl.java | 142 ++- 3 files changed, 103 insertions(+), 90 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e7b09794/extensions/unomi-mailchimp/README.md -- diff --git a/extensions/unomi-mailchimp/README.md b/extensions/unomi-mailchimp/README.md index dc43c4d..0d6f525 100644 --- a/extensions/unomi-mailchimp/README.md +++ b/extensions/unomi-mailchimp/README.md @@ -65,27 +65,30 @@ This extension has 3 actions. ``` MailChimp type supported are: -1. Date +* Date ``` The format is (DD/MM/) or (MM/DD/) ``` -2. Birthday +* Birthday ``` The format is (DD/MM) or (MM/DD) ``` -3. Website or Text +* Website or Text ``` They are text ``` -4. Number +* Number ``` The number will be parse into a Integer ``` -6. Phone +* Phone ``` The North American format is not supported, use international ``` -7. Address +* Address + +NOTE : Street, City, Country and Zip are mandatory properties, otherwise the address property will be skipped + Example: ``` address<=>ADDRESS<=>addr1, http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e7b09794/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/HttpUtils.java -- diff --git a/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/HttpUtils.java b/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/HttpUtils.java index d87fa5f..70290a4 100644 --- a/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/HttpUtils.java +++ b/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/HttpUtils.java @@ -60,12 +60,12 @@ public class HttpUtils { return addBodyAndExecuteRequest(httpClient, body, httpPost); } -public static JsonNode executeGetRequest(CloseableHttpClient httpClient, String url, Map headers) { +public static JsonNode executeGetRequest(CloseableHttpClient httpClient, String url, Map headers, boolean allow404Response) { HttpGet httpGet = new HttpGet(url); addHeaders(headers, httpGet); -return executeRequest(httpClient, httpGet); +return executeRequest(httpClient, httpGet, allow404Response); } public static JsonNode executeDeleteRequest(CloseableHttpClient httpClient, String url, Map headers) { @@ -73,7 +73,7 @@ public class HttpUtils { addHeaders(headers, httpDelete); -return executeRequest(httpClient, httpDelete); +return executeRequest(httpClient, httpDelete, false); } private static JsonNode addBodyAndExecuteRequest(CloseableHttpClient httpClient, String body, HttpEntityEnclosingRequestBase request) { @@ -82,38 +82,43 @@ public class HttpUtils { stringEntity.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json")); request.setEntity(stringEntity); -return executeRequest(httpClient, request); +return executeRequest(httpClient, request, false); } catch (UnsupportedEncodingException e) { logger.error("Error when executing request", e); return null; } } -private static JsonNode executeRequest(CloseableHttpClient httpClient, HttpRequestBase request) { +private static JsonNode executeRequest(CloseableHttpClient httpClient, HttpRequestBase request, boolean allow404Response) { try { CloseableHttpResponse response = httpClient.execute(request); -return extractResponse(response); +return extractResponse(response, allow404Res
[3/3] incubator-unomi git commit: Change consents name and formatDate function
Change consents name and formatDate function Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/77533726 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/77533726 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/77533726 Branch: refs/heads/master Commit: 775337269c11cf477d719da03cb08cb2855b67bf Parents: 68e291a Author: dinesh1996 Authored: Wed Jan 24 15:48:28 2018 +0100 Committer: dinesh1996 Committed: Wed Jan 24 15:48:28 2018 +0100 -- .../services/internal/MailChimpServiceImpl.java | 34 +--- 1 file changed, 15 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/77533726/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java -- diff --git a/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java b/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java index bc4b76b..a704f99 100644 --- a/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java +++ b/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java @@ -40,7 +40,7 @@ import java.util.Map; public class MailChimpServiceImpl implements MailChimpService { private static Logger logger = LoggerFactory.getLogger(MailChimpServiceImpl.class); - + private static final String ACCEPT = "Accept"; private static final String AUTHORIZATION = "Authorization"; private static final String LISTS = "lists"; @@ -69,16 +69,16 @@ public class MailChimpServiceImpl implements MailChimpService { private static final String DATE_FORMAT = "date_format"; private static final String OPTIONS = "options"; private static final String DATE = "date"; -private static final String MM_DD_ = "MM/DD/"; -private static final String MC_BIRTDATE_MM_DD_ = "MM/dd/"; -private static final String MC_BIRTDATE_DD_MM_ = "dd/MM/"; +private static final String MC_MM_DD_ = "MM/DD/"; +private static final String MM_DD_ = "MM/dd/"; +private static final String DD_MM_ = "dd/MM/"; private static final String BIRTHDAY = "birthday"; -private static final String MM_DD = "MM/DD"; -private static final String MC_BIRTDAY_MM_DD = "MM/dd"; -private static final String MC_BIRTDAY_DD_MM = "dd/MM"; +private static final String MC_MM_DD = "MM/DD"; +private static final String MM_DD = "MM/dd"; +private static final String DD_MM = "dd/MM"; private static final String SEPARATOR_CHARS_PROPERTIES = ","; private static final String SEPARATOR_CHARS_PROPERTY = "<=>"; - + private String apiKey; private String urlSubDomain; private Map>> listMergeFieldMapping; @@ -281,18 +281,13 @@ public class MailChimpServiceImpl implements MailChimpService { break; case DATE: if (mergeFieldDefinition.has(OPTIONS) && mergeFieldDefinition.get(OPTIONS).has(DATE_FORMAT)) { -DateTime unomiDate = new DateTime(profile.getProperty(unomiId)); -String mcDateFormat = mergeFieldDefinition.get(OPTIONS).get(DATE_FORMAT).asText(); -mergeFields.put(mcTagName, formatDate(MM_DD_, MC_BIRTDATE_MM_DD_, MC_BIRTDATE_DD_MM_, mcDateFormat, unomiDate)); +mergeFields.put(mcTagName, formatDate(mergeFieldDefinition.get(OPTIONS).get(DATE_FORMAT).asText(), profile.getProperty(unomiId))); } break; case BIRTHDAY: if (mergeFieldDefinition.has(OPTIONS) && mergeFieldDefinition.get(OPTIONS).has(DATE_FORMAT)) { -DateTime unomiDate = new DateTime(profile.getProperty(unomiId)); -String mcDateFormat = mergeFieldDefinition.get(OPTIONS).get(DATE_FORMAT).asText(); -mergeFields.put(mcTagName, formatDate(MM_DD_, MC_BIRTDATE_MM_DD_, MC_BIRTDATE_DD_MM_, mcDateFormat,unomiDate)); +mergeFields.put(mcTagName, formatDate(mergeFieldDefinition.get(OPTIONS).get(DATE_FORMAT).asText(), profile.getProperty(unomiId)));
[2/3] incubator-unomi git commit: Change consents name and formatDate functions
Change consents name and formatDate functions Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/68e291ad Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/68e291ad Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/68e291ad Branch: refs/heads/master Commit: 68e291ad4503cc2892a67ffc03516f6b05cc37de Parents: e7b0979 Author: dinesh1996 Authored: Wed Jan 24 15:17:02 2018 +0100 Committer: dinesh1996 Committed: Wed Jan 24 15:17:02 2018 +0100 -- .../services/internal/MailChimpServiceImpl.java | 56 +++- 1 file changed, 31 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/68e291ad/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java -- diff --git a/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java b/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java index d493455..bc4b76b 100644 --- a/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java +++ b/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java @@ -28,7 +28,6 @@ import org.apache.unomi.mailchimp.services.MailChimpResult; import org.apache.unomi.mailchimp.services.MailChimpService; import org.joda.time.DateTime; import org.joda.time.format.DateTimeFormat; -import org.joda.time.format.DateTimeFormatter; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -39,6 +38,11 @@ import java.util.List; import java.util.Map; public class MailChimpServiceImpl implements MailChimpService { + +private static Logger logger = LoggerFactory.getLogger(MailChimpServiceImpl.class); + +private static final String ACCEPT = "Accept"; +private static final String AUTHORIZATION = "Authorization"; private static final String LISTS = "lists"; private static final String ID = "id"; private static final String NAME = "name"; @@ -53,8 +57,6 @@ public class MailChimpServiceImpl implements MailChimpService { private static final String UNSUBSCRIBED = "unsubscribed"; private static final String TAG = "tag"; private static final String TYPE = "type"; -private static final String OPTIONS = "options"; -private static final String DATE_FORMAT = "date_format"; private static final String UNOMI_ID = "unomiId"; private static final String MC_SUB_TAG_NAME = "mcSubTagName"; private static final String ADDR_1 = "addr1"; @@ -64,19 +66,19 @@ public class MailChimpServiceImpl implements MailChimpService { private static final String STATE = "state"; private static final String ZIP = "zip"; private static final String ADDRESS = "address"; +private static final String DATE_FORMAT = "date_format"; +private static final String OPTIONS = "options"; private static final String DATE = "date"; private static final String MM_DD_ = "MM/DD/"; -private static final String MM_DD_1 = "MM/dd/"; -private static final String DD_MM_ = "dd/MM/"; +private static final String MC_BIRTDATE_MM_DD_ = "MM/dd/"; +private static final String MC_BIRTDATE_DD_MM_ = "dd/MM/"; private static final String BIRTHDAY = "birthday"; private static final String MM_DD = "MM/DD"; -private static final String MM_DD_LOWERCASE = "MM/dd"; -private static final String DD_MM = "dd/MM"; -private static final String ACCEPT = "Accept"; -private static final String AUTHORIZATION = "Authorization"; +private static final String MC_BIRTDAY_MM_DD = "MM/dd"; +private static final String MC_BIRTDAY_DD_MM = "dd/MM"; private static final String SEPARATOR_CHARS_PROPERTIES = ","; private static final String SEPARATOR_CHARS_PROPERTY = "<=>"; -private static Logger logger = LoggerFactory.getLogger(MailChimpServiceImpl.class); + private String apiKey; private String urlSubDomain; private Map>> listMergeFieldMapping; @@ -112,7 +114,7 @@ public class MailChimpServiceImpl implements MailChimpService { @Override public MailChimpResult addToMCList(Profile profile, Action action) { if (!isMailChimpConnectorConfigured() || profile.getProperty(EMAIL) == null) { -logger.error("The visitor hasn't email address"); +logger.error("The visitor does not have an email address"); return MailChimpResult.ERROR; } @@ -278,10 +280
incubator-unomi git commit: UNOMI-117 fix issue with new persona never saved
Repository: incubator-unomi Updated Branches: refs/heads/master af622f8c2 -> 28097ef32 UNOMI-117 fix issue with new persona never saved Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/28097ef3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/28097ef3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/28097ef3 Branch: refs/heads/master Commit: 28097ef329152296bf88320c99f8d24501f11e3c Parents: af622f8 Author: dgaillard Authored: Mon Jan 22 19:06:44 2018 +0100 Committer: dgaillard Committed: Mon Jan 22 19:06:44 2018 +0100 -- .../org/apache/unomi/services/services/ProfileServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/28097ef3/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 4d1b40e..b385c2a 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 @@ -772,7 +772,7 @@ public class ProfileServiceImpl implements ProfileService, SynchronousBundleList PersonaWithSessions persona = CustomObjectMapper.getObjectMapper().readValue(predefinedPersonaURL, PersonaWithSessions.class); String itemId = persona.getPersona().getItemId(); -if (persistenceService.load(itemId, Persona.class) != null) { +if (persistenceService.load(itemId, Persona.class) == null) { persistenceService.save(persona.getPersona()); }
[1/2] incubator-unomi git commit: UNOMI-147 Separator updated to = to <=>
Repository: incubator-unomi Updated Branches: refs/heads/master 3acf022d2 -> af622f8c2 UNOMI-147 Separator updated to = to <=> Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/10e8d9f0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/10e8d9f0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/10e8d9f0 Branch: refs/heads/master Commit: 10e8d9f0dd32137b2bcb26811a7dc516b339ef34 Parents: 3acf022 Author: Dinesh Authored: Wed Jan 17 15:58:55 2018 +0100 Committer: Dinesh Committed: Wed Jan 17 15:58:55 2018 +0100 -- .../org/apache/unomi/sfdc/services/SFDCConfiguration.java| 4 ++-- .../apache/unomi/sfdc/services/internal/SFDCServiceImpl.java | 2 +- .../services/src/main/resources/org.apache.unomi.sfdc.cfg| 8 .../mailchimp/services/internal/MailChimpServiceImpl.java| 2 +- .../main/resources/org.apache.unomi.mailchimpconnector.cfg | 6 +++--- .../persistence/spi/PropertyTypedObjectDeserializer.java | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/10e8d9f0/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java -- diff --git a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java index e71004b..94495c8 100644 --- a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java +++ b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java @@ -118,7 +118,7 @@ public class SFDCConfiguration extends Item { String[] mappings = sfdcFieldMappings.split(","); if (mappings != null && mappings.length > 0) { for (String mapping : mappings) { -String[] parts = mapping.split("="); +String[] parts = mapping.split("<=>"); if (parts != null && parts.length == 2) { unomiToSfdcFieldMappings.put(parts[0], parts[1]); sfdcToUnomiFieldMappings.put(parts[1], parts[0]); @@ -129,7 +129,7 @@ public class SFDCConfiguration extends Item { public void setSfdcFieldMappingsIdentifier(String sfdcFieldMappingsIdentifier) { this.sfdcFieldMappingsIdentifier = sfdcFieldMappingsIdentifier; -String[] sfdcFieldMappingsIdentifierParts = sfdcFieldMappingsIdentifier.split("="); +String[] sfdcFieldMappingsIdentifierParts = sfdcFieldMappingsIdentifier.split("<=>"); if (sfdcFieldMappingsIdentifierParts != null && sfdcFieldMappingsIdentifierParts.length == 2) { unomiIdentifierField = sfdcFieldMappingsIdentifierParts[0]; sfdcIdentifierField = sfdcFieldMappingsIdentifierParts[1]; http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/10e8d9f0/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java -- diff --git a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java index 3f1ce0a..6f7a92a 100644 --- a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java +++ b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java @@ -359,7 +359,7 @@ public class SFDCServiceImpl implements SFDCService { String[] mappingConsents = mappingConsentsString.split(","); if (mappingConsents.length > 0) { for (String mappingConsent : mappingConsents) { -String[] mappingConsentArray = mappingConsent.split(":"); +String[] mappingConsentArray = mappingConsent.split("<=>"); if (mappingConsentArray.length <= 0) { logger.error("Error with the mapping for field {}, this field will not be mapped please check the cfg file", mappingConsentsString); } else { http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/10e8d9f0/extensions/salesforce-connector/services/src/main/resources/org.apache.unomi.sfdc.cfg -- diff --git a/extensions/salesforce-connector/services/src/main/resources/org.apache.unomi.sfdc.cfg
[2/2] incubator-unomi git commit: Updated ReadMe file
Updated ReadMe file Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/af622f8c Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/af622f8c Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/af622f8c Branch: refs/heads/master Commit: af622f8c23addf51e589cafb5167f06aee2e89ab Parents: 10e8d9f Author: Dinesh Authored: Wed Jan 17 17:28:31 2018 +0100 Committer: Dinesh Committed: Wed Jan 17 17:28:31 2018 +0100 -- extensions/unomi-mailchimp/README.md | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/af622f8c/extensions/unomi-mailchimp/README.md -- diff --git a/extensions/unomi-mailchimp/README.md b/extensions/unomi-mailchimp/README.md index dc827e2..dc43c4d 100644 --- a/extensions/unomi-mailchimp/README.md +++ b/extensions/unomi-mailchimp/README.md @@ -57,11 +57,11 @@ This extension has 3 actions. ``` This is the property to configure for the mapping, the format is as shown. ``` -mailChimpConnector.list.merge-fields.mapping={Apache Unomi property ID}:{MailChimp Tag name} +mailChimpConnector.list.merge-fields.mapping={Apache Unomi property ID}<=>{MailChimp Tag name} ``` NOTE: there is a particular format for the address ``` -{Apache Unomi property ID}:{MailChimp Tag name}:{MailChimp tag sub entry} +{Apache Unomi property ID}<=>{MailChimp Tag name}<=>{MailChimp tag sub entry} ``` MailChimp type supported are: @@ -88,10 +88,10 @@ This extension has 3 actions. 7. Address Example: ``` -address:ADDRESS:addr1, -city:ADDRESS:city, -zipCode:ADDRESS:zip, -countryName:ADDRESS:country +address<=>ADDRESS<=>addr1, +city<=>ADDRESS<=>city, +zipCode<=>ADDRESS<=>zip, +countryName<=>ADDRESS<=>country ``` 5. Deploy into Apache Unomi using the following commands from the Apache Karaf shell:
incubator-unomi git commit: Add comment, how to configure the cfg file
Repository: incubator-unomi Updated Branches: refs/heads/master 37becc37b -> 3acf022d2 Add comment, how to configure the cfg file Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/3acf022d Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/3acf022d Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/3acf022d Branch: refs/heads/master Commit: 3acf022d24e4b7aab568c094ef80306a2c0ae8a8 Parents: 37becc3 Author: Dinesh Authored: Wed Jan 17 11:27:51 2018 +0100 Committer: Dinesh Committed: Wed Jan 17 11:27:51 2018 +0100 -- .../services/src/main/resources/org.apache.unomi.sfdc.cfg | 2 ++ 1 file changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/3acf022d/extensions/salesforce-connector/services/src/main/resources/org.apache.unomi.sfdc.cfg -- diff --git a/extensions/salesforce-connector/services/src/main/resources/org.apache.unomi.sfdc.cfg b/extensions/salesforce-connector/services/src/main/resources/org.apache.unomi.sfdc.cfg index 14e7371..d43d1b5 100644 --- a/extensions/salesforce-connector/services/src/main/resources/org.apache.unomi.sfdc.cfg +++ b/extensions/salesforce-connector/services/src/main/resources/org.apache.unomi.sfdc.cfg @@ -21,8 +21,10 @@ sfdc.user.securityToken= sfdc.consumer.key= sfdc.consumer.secret= sfdc.channel=/topic/LeadUpdates +# Property Mapping Example: unomiPropertyId=SFDCPropertyId sfdc.fields.mappings=email=Email,firstName=FirstName,lastName=LastName,company=Company,phoneNumber=Phone,jobTitle=Title,city=City,zipCode=PostalCode,address=Street,sfdcStatus=Status,sfdcRating=Rating sfdc.fields.mappings.identifier=email=Email sfdc.checkIfContactExistBeforeLeadCreation=false sfdc.session.timeout=90 +# Consent Mapping Example: unomiConsentId:SFDCPropertyId sfdc.fields.consents=
[2/6] incubator-unomi git commit: Add Consents mapping to sfdc extension
Add Consents mapping to sfdc extension Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/9b29d94b Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/9b29d94b Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/9b29d94b Branch: refs/heads/master Commit: 9b29d94ba0f4826f48cdd005e616728fef936756 Parents: a459cf3 Author: Dinesh Authored: Wed Jan 3 10:50:55 2018 +0100 Committer: Dinesh Committed: Wed Jan 3 10:50:55 2018 +0100 -- .../unomi/sfdc/services/SFDCConfiguration.java | 23 +--- .../sfdc/services/internal/SFDCServiceImpl.java | 3 +-- .../resources/OSGI-INF/blueprint/blueprint.xml | 4 ++-- .../main/resources/org.apache.unomi.sfdc.cfg| 1 + 4 files changed, 14 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/9b29d94b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java -- diff --git a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java index ac1aac0..f176ce8 100644 --- a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java +++ b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java @@ -43,21 +43,18 @@ public class SFDCConfiguration extends Item { private String sfdcChannel; private String sfdcFieldMappings; private String sfdcFieldMappingsIdentifier; - +private String unomiIdentifierField; +private String sfdcIdentifierField; +private boolean sfdcCheckIfContactExistBeforeLeadCreation; +private String sfdcFieldsConsents; private long sfdcSessionTimeout = 15 * 60 * 1000L; // 15 minutes by default private Map unomiToSfdcFieldMappings = new HashMap<>(); private Map sfdcToUnomiFieldMappings = new HashMap<>(); -private String unomiIdentifierField; -private String sfdcIdentifierField; - -private boolean sfdcCheckIfContactExistBeforeLeadCreation; - -private String sfdcFieldsConsent; - -public SFDCConfiguration() { } +public SFDCConfiguration() { +} public String getSfdcLoginEndpoint() { return sfdcLoginEndpoint; @@ -158,12 +155,12 @@ public class SFDCConfiguration extends Item { this.sfdcCheckIfContactExistBeforeLeadCreation = sfdcCheckIfContactExistBeforeLeadCreation; } -public String getSfdcFieldsConsent() { -return sfdcFieldsConsent; +public String getSfdcFieldsConsents() { +return sfdcFieldsConsents; } -public void setSfdcFieldsConsent(String sfdcFieldsConsent) { -this.sfdcFieldsConsent = sfdcFieldsConsent; +public void setSfdcFieldsConsents(String sfdcFieldsConsents) { +this.sfdcFieldsConsents = sfdcFieldsConsents; } public Map getUnomiToSfdcFieldMappings() { http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/9b29d94b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java -- diff --git a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java index 3434773..c3cdf38 100644 --- a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java +++ b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java @@ -355,7 +355,7 @@ public class SFDCServiceImpl implements SFDCService { private boolean isMappingConsent(Profile profile, Map sfdcLeadFields) { Map consents = profile.getConsents(); -String mappingConsentsString = sfdcConfiguration.getSfdcFieldsConsent(); +String mappingConsentsString = sfdcConfiguration.getSfdcFieldsConsents(); if (mappingConsentsString.isEmpty()) { return false; } @@ -390,7 +390,6 @@ public class SFDCServiceImpl implements SFDCService { if (!isConnected()) { return null; } - // first we must check if an existing contact exists for the profile. String unomiIdentifierValue = (String) profile.getProperty(sfdcConfiguration.getUnomiIdentifierField()); if (isProfileInContacts(unomiIdentifierValue)) { http://git-wip-us.apache.org/repos/asf/incu
[6/6] incubator-unomi git commit: This closes pull request number #42
This closes pull request number #42 Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/37becc37 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/37becc37 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/37becc37 Branch: refs/heads/master Commit: 37becc37beed91c90981bedbfdbd510308605a61 Parents: c03d0a8 7d227ac Author: dgaillard Authored: Tue Jan 16 15:27:23 2018 +0100 Committer: dgaillard Committed: Tue Jan 16 15:27:23 2018 +0100 -- .../unomi/sfdc/services/SFDCConfiguration.java | 23 ++-- .../sfdc/services/internal/SFDCServiceImpl.java | 29 +++- .../resources/OSGI-INF/blueprint/blueprint.xml | 2 ++ .../main/resources/org.apache.unomi.sfdc.cfg| 1 + 4 files changed, 45 insertions(+), 10 deletions(-) --
[1/6] incubator-unomi git commit: Create a mapping between Apache Unomi consent and SalesForce. The visitor need to accept consent before
Repository: incubator-unomi Updated Branches: refs/heads/master c03d0a86b -> 37becc37b Create a mapping between Apache Unomi consent and SalesForce. The visitor need to accept consent before Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/a459cf3f Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/a459cf3f Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/a459cf3f Branch: refs/heads/master Commit: a459cf3f2137af6bc621700aa30b9373cea1eb2f Parents: f074cb1 Author: Dinesh Authored: Wed Dec 27 15:23:55 2017 +0100 Committer: Dinesh Committed: Wed Dec 27 15:23:55 2017 +0100 -- .../unomi/sfdc/services/SFDCConfiguration.java | 12 ++ .../sfdc/services/internal/SFDCServiceImpl.java | 40 .../resources/OSGI-INF/blueprint/blueprint.xml | 2 + 3 files changed, 54 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/a459cf3f/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java -- diff --git a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java index 116daed..ac1aac0 100644 --- a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java +++ b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java @@ -43,6 +43,8 @@ public class SFDCConfiguration extends Item { private String sfdcChannel; private String sfdcFieldMappings; private String sfdcFieldMappingsIdentifier; + + private long sfdcSessionTimeout = 15 * 60 * 1000L; // 15 minutes by default private Map unomiToSfdcFieldMappings = new HashMap<>(); @@ -53,6 +55,8 @@ public class SFDCConfiguration extends Item { private boolean sfdcCheckIfContactExistBeforeLeadCreation; +private String sfdcFieldsConsent; + public SFDCConfiguration() { } public String getSfdcLoginEndpoint() { @@ -154,6 +158,14 @@ public class SFDCConfiguration extends Item { this.sfdcCheckIfContactExistBeforeLeadCreation = sfdcCheckIfContactExistBeforeLeadCreation; } +public String getSfdcFieldsConsent() { +return sfdcFieldsConsent; +} + +public void setSfdcFieldsConsent(String sfdcFieldsConsent) { +this.sfdcFieldsConsent = sfdcFieldsConsent; +} + public Map getUnomiToSfdcFieldMappings() { return unomiToSfdcFieldMappings; } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/a459cf3f/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java -- diff --git a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java index 0872932..3434773 100644 --- a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java +++ b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java @@ -31,6 +31,7 @@ import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.message.BasicNameValuePair; import org.apache.http.util.EntityUtils; +import org.apache.unomi.api.Consent; import org.apache.unomi.api.Profile; import org.apache.unomi.persistence.spi.PersistenceService; import org.apache.unomi.sfdc.services.SFDCConfiguration; @@ -352,11 +353,44 @@ public class SFDCServiceImpl implements SFDCService { return false; } +private boolean isMappingConsent(Profile profile, Map sfdcLeadFields) { +Map consents = profile.getConsents(); +String mappingConsentsString = sfdcConfiguration.getSfdcFieldsConsent(); +if (mappingConsentsString.isEmpty()) { +return false; +} +String[] mappingConsents = mappingConsentsString.split(","); +if (mappingConsents.length <= 0) { +logger.error("Error with the mapping field {} please check the cfg file", mappingConsentsString); +return false; +} +boolean isPerfectlyMapped = true; +for (String oneMappingConsent : mappingConsents) { +String[] oneRawMappingConsent = oneMappingConsent.split(":"); + +if (oneRawMappingConsent.length <=
[3/6] incubator-unomi git commit: code cleanup
code cleanup Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/9c4ec804 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/9c4ec804 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/9c4ec804 Branch: refs/heads/master Commit: 9c4ec8046876a00ec19381f5860d88f22b2f231a Parents: 9b29d94 Author: Dinesh Authored: Fri Jan 12 10:49:09 2018 +0100 Committer: Dinesh Committed: Fri Jan 12 10:49:09 2018 +0100 -- .../org/apache/unomi/sfdc/services/SFDCConfiguration.java| 8 ++-- .../apache/unomi/sfdc/services/internal/SFDCServiceImpl.java | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/9c4ec804/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java -- diff --git a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java index f176ce8..e71004b 100644 --- a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java +++ b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/SFDCConfiguration.java @@ -53,8 +53,7 @@ public class SFDCConfiguration extends Item { private Map unomiToSfdcFieldMappings = new HashMap<>(); private Map sfdcToUnomiFieldMappings = new HashMap<>(); -public SFDCConfiguration() { -} +public SFDCConfiguration() { } public String getSfdcLoginEndpoint() { return sfdcLoginEndpoint; @@ -84,9 +83,7 @@ public class SFDCConfiguration extends Item { return sfdcUserSecurityToken; } -public void setSfdcUserSecurityToken(String sfdcUserSecurityToken) { -this.sfdcUserSecurityToken = sfdcUserSecurityToken; -} +public void setSfdcUserSecurityToken(String sfdcUserSecurityToken) { this.sfdcUserSecurityToken = sfdcUserSecurityToken; } public String getSfdcConsumerKey() { return sfdcConsumerKey; @@ -138,7 +135,6 @@ public class SFDCConfiguration extends Item { sfdcIdentifierField = sfdcFieldMappingsIdentifierParts[1]; } } - public long getSfdcSessionTimeout() { return sfdcSessionTimeout; } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/9c4ec804/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java -- diff --git a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java index c3cdf38..4bc2555 100644 --- a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java +++ b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java @@ -66,7 +66,6 @@ public class SFDCServiceImpl implements SFDCService { private static final String REST_ENDPOINT_URI = "/services/data/v38.0"; private static final String STREAMING_ENDPOINT_URI = "/cometd/38.0"; - private static final String RESULTSET_KEY_CONTACT = "CONTACT"; private static final String RESULTSET_KEY_LEAD = "LEAD"; @@ -453,7 +452,6 @@ public class SFDCServiceImpl implements SFDCService { logger.warn("The consents mapping went wrong"); } - if (sfdcLeadFields.size() == 0) { logger.info("No SFDC field value to send, will not send anything to Salesforce."); if (foundExistingSfdcLeadIds.size() == 0) {
[5/6] incubator-unomi git commit: Review and clean code
Review and clean code Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/7d227ac1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/7d227ac1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/7d227ac1 Branch: refs/heads/master Commit: 7d227ac1d6da1eb9965718b0c5c922dee0531381 Parents: ab530c8 Author: dgaillard Authored: Tue Jan 16 15:21:17 2018 +0100 Committer: dgaillard Committed: Tue Jan 16 15:21:17 2018 +0100 -- .../sfdc/services/internal/SFDCServiceImpl.java | 50 1 file changed, 20 insertions(+), 30 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/7d227ac1/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java -- diff --git a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java index fad7dbd..3f1ce0a 100644 --- a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java +++ b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java @@ -352,36 +352,30 @@ public class SFDCServiceImpl implements SFDCService { return false; } -private boolean isMappingConsent(Profile profile, Map sfdcLeadFields) { +private void addConsents(Profile profile, Map sfdcLeadFields) { Map consents = profile.getConsents(); String mappingConsentsString = sfdcConfiguration.getSfdcFieldsConsents(); -if (mappingConsentsString.isEmpty()) { -return false; -} -String[] mappingConsents = mappingConsentsString.split(","); -if (mappingConsents.length <= 0) { -logger.error("Error with the mapping field {} please check the cfg file", mappingConsentsString); -return false; -} -boolean isPerfectlyMapped = true; -for (String oneMappingConsent : mappingConsents) { -String[] oneRawMappingConsent = oneMappingConsent.split(":"); - -if (oneRawMappingConsent.length <= 0) { -logger.error("Error with the mapping field {} please check the cfg file", mappingConsentsString); -isPerfectlyMapped = false; -} else { -if (consents.get(oneRawMappingConsent[0]) == null) { -logger.warn("Consent {} not found or didn't answer yet", oneRawMappingConsent[0]); -isPerfectlyMapped = false; -} -if (isPerfectlyMapped) { -sfdcLeadFields.put(oneRawMappingConsent[1], consents.get(oneRawMappingConsent[0]).getStatus().toString()); -logger.info("Consent {} was mapped with {}", oneRawMappingConsent[0], oneRawMappingConsent[1]); +if (!mappingConsentsString.isEmpty()) { +String[] mappingConsents = mappingConsentsString.split(","); +if (mappingConsents.length > 0) { +for (String mappingConsent : mappingConsents) { +String[] mappingConsentArray = mappingConsent.split(":"); +if (mappingConsentArray.length <= 0) { +logger.error("Error with the mapping for field {}, this field will not be mapped please check the cfg file", mappingConsentsString); +} else { +String consentUnomiId = mappingConsentArray[0]; +if (consents.containsKey(consentUnomiId)) { +String consentSfdcId = mappingConsentArray[1]; +String consentValue = consents.get(consentUnomiId).getStatus().toString(); +sfdcLeadFields.put(consentSfdcId, consentValue); +logger.debug("Consent {} with value {} was mapped with {}", consentUnomiId, consentValue, consentSfdcId); +} else { +logger.debug("Consent {} not found in current profile or not answered yet", consentUnomiId); +} +} } } } -return isPerfectlyMapped; } @Override @@ -446,11 +440,7 @@ public class SFDCServiceImpl implements SFDCService { } } } -if (isMappingConsent(profile, sfdcLeadFields)) { -
[4/6] incubator-unomi git commit: change a logger warn to info
change a logger warn to info Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/ab530c8c Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/ab530c8c Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/ab530c8c Branch: refs/heads/master Commit: ab530c8c614f73477249c47f3db91c5e8ff6b6d6 Parents: 9c4ec80 Author: Dinesh Authored: Fri Jan 12 11:19:30 2018 +0100 Committer: Dinesh Committed: Fri Jan 12 11:19:30 2018 +0100 -- .../org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ab530c8c/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java -- diff --git a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java index 4bc2555..fad7dbd 100644 --- a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java +++ b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java @@ -447,7 +447,7 @@ public class SFDCServiceImpl implements SFDCService { } } if (isMappingConsent(profile, sfdcLeadFields)) { -logger.warn("Ok Well Done"); +logger.info("The consents were mapped correctly"); } else { logger.warn("The consents mapping went wrong"); }
[2/6] incubator-unomi git commit: Optimized code and changed the mapping logic
Optimized code and changed the mapping logic Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/fecf0433 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/fecf0433 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/fecf0433 Branch: refs/heads/master Commit: fecf04338f41519bac87485be1b64f5c0fbf502d Parents: b22664d Author: Dinesh Authored: Wed Dec 13 17:27:38 2017 +0100 Committer: Dinesh Committed: Wed Dec 13 17:27:38 2017 +0100 -- extensions/unomi-mailchimp/README.md| 19 +++- .../mailchimp/services/MailChimpService.java| 2 +- .../services/internal/MailChimpServiceImpl.java | 93 +++- .../org.apache.unomi.mailchimpconnector.cfg | 6 +- 4 files changed, 69 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/fecf0433/extensions/unomi-mailchimp/README.md -- diff --git a/extensions/unomi-mailchimp/README.md b/extensions/unomi-mailchimp/README.md index 86ac30d..914491d 100644 --- a/extensions/unomi-mailchimp/README.md +++ b/extensions/unomi-mailchimp/README.md @@ -33,7 +33,7 @@ This extension have 3 actions. ## Getting started -1. Create a new MailChimp account : +1. Create a new MailChimp account: https://login.mailchimp.com/signup/ @@ -41,12 +41,23 @@ This extension have 3 actions. https://usX.admin.mailchimp.com/account/api/ -3. Configure the MailChimp Connector. In the etc/org.apache.unomi.mailchimpconnector.cfg file change the following settings: +3. Configure the MailChimp Connector +1. In the etc/org.apache.unomi.mailchimpconnector.cfg file change the following settings: -mailChimpConnector.apiKey=YOUR_APIKEY -mailChimpConnector.url.subDomain=YOUR_SUB_DOMAIN (exemple: https://usX.admin.mailchimp.com/account/api/, the X is the SUB_DOMAIN) +mailChimpConnector.apiKey=YOUR_APIKEY +mailChimpConnector.url.subDomain=YOUR_SUB_DOMAIN (exemple: https://usX.admin.mailchimp.com/account/api/, the X is the SUB_DOMAIN) + +2. Mapping between Apache Unomi to MailChimp: + +mailChimpConnector.list.merge-fields.activate={Boolean} if you like to active mapping feature. +mailChimpConnector.list.merge-fields.mapping={Tag for MailChimp, 10 characters max}:{Apache Unomi property name}:{MailChimp display property name}:{property type} +(exemple : COMPANY:company:Company:text) 4. Deploy into Apache Unomi using the following commands from the Apache Karaf shell: feature:repo-add mvn:org.apache.unomi/unomi-mailchimp-connector-karaf-kar/${project.version}/xml/features feature:install unomi-mailchimp-connector-karaf-kar + + + + http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/fecf0433/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/MailChimpService.java -- diff --git a/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/MailChimpService.java b/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/MailChimpService.java index b75d113..24179b4 100644 --- a/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/MailChimpService.java +++ b/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/MailChimpService.java @@ -62,7 +62,7 @@ public interface MailChimpService { MailChimpResult unsubscribeFromMCList(Profile profile, Action action); /** - * This function will update merger properties of MailChimp list. + * This function will update merge properties of MailChimp list. * * @param action @see org.apache.unomi.api.actions.Action * @return true if the visitor is successfully unsbscribed to a MailChimp list. http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/fecf0433/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java -- diff --git a/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java b/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java index 4ac3a07..eeea3d5 100644 --- a/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java +++ b/extensions/unomi-mailchimp/services/src/main/java
[1/6] incubator-unomi git commit: Change after code review
Repository: incubator-unomi Updated Branches: refs/heads/master 0979f7e66 -> c03d0a86b Change after code review Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/b22664dd Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/b22664dd Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/b22664dd Branch: refs/heads/master Commit: b22664dde4917d1775cef354b10c2edc346fb775 Parents: d8de498 Author: Dinesh Authored: Fri Dec 8 17:48:35 2017 +0100 Committer: Dinesh Committed: Fri Dec 8 17:48:35 2017 +0100 -- extensions/unomi-mailchimp/README.md| 4 +- extensions/unomi-mailchimp/pom.xml | 2 +- .../mailchimp/services/MailChimpResult.java | 1 + .../mailchimp/services/MailChimpService.java| 2 +- .../services/internal/MailChimpServiceImpl.java | 149 +-- .../resources/OSGI-INF/blueprint/blueprint.xml | 7 +- .../org.apache.unomi.mailchimpconnector.cfg | 4 +- 7 files changed, 83 insertions(+), 86 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b22664dd/extensions/unomi-mailchimp/README.md -- diff --git a/extensions/unomi-mailchimp/README.md b/extensions/unomi-mailchimp/README.md index 3ecfa15..86ac30d 100644 --- a/extensions/unomi-mailchimp/README.md +++ b/extensions/unomi-mailchimp/README.md @@ -16,7 +16,7 @@ --> -Apache Unomi :: Extensions :: MailChimp Beta Connector +Apache Unomi :: Extensions :: MailChimp Connector = This extension have 3 actions. @@ -41,7 +41,7 @@ This extension have 3 actions. https://usX.admin.mailchimp.com/account/api/ -3. Configure the MailChimp Beta Connector. In the etc/org.apache.unomi.mailchimpconnector.cfg file change the following settings: +3. Configure the MailChimp Connector. In the etc/org.apache.unomi.mailchimpconnector.cfg file change the following settings: mailChimpConnector.apiKey=YOUR_APIKEY mailChimpConnector.url.subDomain=YOUR_SUB_DOMAIN (exemple: https://usX.admin.mailchimp.com/account/api/, the X is the SUB_DOMAIN) http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b22664dd/extensions/unomi-mailchimp/pom.xml -- diff --git a/extensions/unomi-mailchimp/pom.xml b/extensions/unomi-mailchimp/pom.xml index be2cc2a..0f33684 100644 --- a/extensions/unomi-mailchimp/pom.xml +++ b/extensions/unomi-mailchimp/pom.xml @@ -26,7 +26,7 @@ unomi-mailchimp-connector -Apache Unomi :: Extensions :: MailChimp Beta Connector +Apache Unomi :: Extensions :: MailChimp Connector Connector with the MailChimp API service pom http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b22664dd/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/MailChimpResult.java -- diff --git a/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/MailChimpResult.java b/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/MailChimpResult.java index 4f100b6..22919f7 100644 --- a/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/MailChimpResult.java +++ b/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/MailChimpResult.java @@ -23,5 +23,6 @@ public enum MailChimpResult { UPDATED, REMOVED, ERROR, +SUCCESS, NO_CHANGE } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b22664dd/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/MailChimpService.java -- diff --git a/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/MailChimpService.java b/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/MailChimpService.java index 132d369..b75d113 100644 --- a/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/MailChimpService.java +++ b/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/MailChimpService.java @@ -67,7 +67,7 @@ public interface MailChimpService { * @param action @see org.apache.unomi.api.actions.Action * @return true if the visitor is successfully unsbscribed to a MailChimp list. */ -MailChimpResult updateMergerPropertiesForList(Profile profile,Action action,JSONObject nameStruct); +MailChimpResult updateMCProfileProperties(Profile profile, Action action); }