[incubator-unomi] branch master updated: Fix Kar feature deployment in Karaf 4.2.x
This is an automated email from the ASF dual-hosted git repository. shuber pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-unomi.git The following commit(s) were added to refs/heads/master by this push: new 06d6820 Fix Kar feature deployment in Karaf 4.2.x new 724d34c This closes pull request number #75 06d6820 is described below commit 06d6820ee7e809c055bcc0aef74ef0ac85dfdf0a Author: Francois Papon AuthorDate: Thu Jan 17 09:27:59 2019 +0400 Fix Kar feature deployment in Karaf 4.2.x --- kar/src/main/feature/feature.xml | 6 ++ 1 file changed, 6 insertions(+) diff --git a/kar/src/main/feature/feature.xml b/kar/src/main/feature/feature.xml index 4301c38..75a0efb 100644 --- a/kar/src/main/feature/feature.xml +++ b/kar/src/main/feature/feature.xml @@ -17,13 +17,19 @@ --> http://karaf.apache.org/xmlns/features/v1.3.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.3.0 http://karaf.apache.org/xmlns/features/v1.3.0;> + + mvn:org.apache.cxf.karaf/apache-cxf/${cxf.version}/xml/features + mvn:org.apache.karaf.cellar/apache-karaf-cellar/${version.karaf.cellar}/xml/features + war cxf cellar eventadmin +shell-compat wrap +aries-blueprint mvn:org.apache.unomi/unomi-wab/${project.version}/cfg/unomicfg mvn:org.apache.unomi/unomi-persistence-elasticsearch-core/${project.version}/cfg/elasticsearchcfg mvn:org.apache.unomi/unomi-plugins-request/${project.version}/cfg/requestcfg
[incubator-unomi] branch master updated: UNOMI-218 add queryParam annotation to the Unomi server rest API methods
This is an automated email from the ASF dual-hosted git repository. shuber pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-unomi.git The following commit(s) were added to refs/heads/master by this push: new 9cd7c00 UNOMI-218 add queryParam annotation to the Unomi server rest API methods new ab96c77 This closes pull request number #76 9cd7c00 is described below commit 9cd7c00bea29bab739fd5546718d515170242e20 Author: Taybou AuthorDate: Tue Jan 22 17:54:35 2019 +0100 UNOMI-218 add queryParam annotation to the Unomi server rest API methods --- .../org/apache/unomi/rest/ProfileServiceEndPoint.java| 7 --- .../org/apache/unomi/rest/ScoringServiceEndPoint.java| 10 -- .../org/apache/unomi/rest/SegmentServiceEndPoint.java| 11 +-- .../org/apache/unomi/rest/UserListServiceEndPoint.java | 16 ++-- 4 files changed, 31 insertions(+), 13 deletions(-) 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 cb332df..0e47106 100644 --- a/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java +++ b/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java @@ -217,7 +217,7 @@ public class ProfileServiceEndPoint { @DELETE @Path("/{profileId}") public void delete(@PathParam("profileId") String profileId, @QueryParam("persona") @DefaultValue("false") boolean persona) { -profileService.delete(profileId, false); +profileService.delete(profileId, persona); } /** @@ -335,11 +335,12 @@ public class ProfileServiceEndPoint { * Removes the persona identified by the specified identifier. * * @param personaId the identifier of the persona to delete + * @param persona {@code true} if the specified identifier is supposed to refer to a persona, {@code false} if it is supposed to refer to a profile */ @DELETE @Path("/personas/{personaId}") -public void deletePersona(@PathParam("personaId") String personaId) { -profileService.delete(personaId, true); +public void deletePersona(@PathParam("personaId") String personaId, @QueryParam("persona") @DefaultValue("true") boolean persona) { +profileService.delete(personaId, persona); } /** diff --git a/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java b/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java index 599a42f..c7b83cc 100644 --- a/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java +++ b/rest/src/main/java/org/apache/unomi/rest/ScoringServiceEndPoint.java @@ -61,13 +61,19 @@ public class ScoringServiceEndPoint { /** * Retrieves the set of all scoring metadata. + * @param offset zero or a positive integer specifying the position of the first element in the total ordered collection of matching elements + * @param size a positive integer specifying how many matching elements should be retrieved or {@code -1} if all of them should be retrieved + * @param sortBy an optional ({@code null} if no sorting is required) String of comma ({@code ,}) separated property names on which ordering should be performed, ordering + * elements according to the property order in the + * String, considering each in turn and moving on to the next one in case of equality of all preceding ones. Each property name is optionally followed by + * a column ({@code :}) and an order specifier: {@code asc} or {@code desc}. * * @return the set of all scoring metadata */ @GET @Path("/") -public List getScoringMetadatas() { -return segmentService.getScoringMetadatas(0, 50, null).getList(); +public List getScoringMetadatas(@QueryParam("offset") @DefaultValue("0") int offset, @QueryParam("size") @DefaultValue("50") int size, @QueryParam("sort") String sortBy) { +return segmentService.getScoringMetadatas(offset,size,sortBy).getList(); } /** diff --git a/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java b/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java index 5d0e09c..240c9a0 100644 --- a/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java +++ b/rest/src/main/java/org/apache/unomi/rest/SegmentServiceEndPoint.java @@ -106,12 +106,19 @@ public class SegmentServiceEndPoint { /** * Retrieves the 50 first segment metadatas. * + * @param offset zero or a positive integer specifying the position of the first element in the total ordered collection of matching elements + * @param size a positive integer specifying how many matching el
[incubator-unomi] branch master updated: Update copyright
This is an automated email from the ASF dual-hosted git repository. shuber pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-unomi.git The following commit(s) were added to refs/heads/master by this push: new d431a54 Update copyright d431a54 is described below commit d431a546205f48d84e756ea4ddb2796e537074b4 Author: Serge Huber AuthorDate: Thu Jan 31 10:19:05 2019 +0100 Update copyright Signed-off-by: Serge Huber --- NOTICE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NOTICE b/NOTICE index 1bebe81..20fa743 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ Apache Unomi (incubating) -Copyright 2016 The Apache Software Foundation +Copyright 2015-2019 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/).
incubator-unomi git commit: UNOMI-216 Centralize configuration in unomi.properties - Remove interface from Hazelcast TCP-IP configuration
Repository: incubator-unomi Updated Branches: refs/heads/master 252cca81e -> 4b447c206 UNOMI-216 Centralize configuration in unomi.properties - Remove interface from Hazelcast TCP-IP configuration Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/4b447c20 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/4b447c20 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/4b447c20 Branch: refs/heads/master Commit: 4b447c2063a0fbafc7413169cc1dbcbfb5400e90 Parents: 252cca8 Author: Serge Huber Authored: Fri Dec 21 15:38:03 2018 +0100 Committer: Serge Huber Committed: Fri Dec 21 15:38:03 2018 +0100 -- package/src/main/resources/etc/custom.system.properties | 1 - services/src/main/resources/hazelcast.xml | 1 - 2 files changed, 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/4b447c20/package/src/main/resources/etc/custom.system.properties -- diff --git a/package/src/main/resources/etc/custom.system.properties b/package/src/main/resources/etc/custom.system.properties index 3e3dfeb..f1ad51e 100644 --- a/package/src/main/resources/etc/custom.system.properties +++ b/package/src/main/resources/etc/custom.system.properties @@ -25,7 +25,6 @@ org.apache.unomi.hazelcast.group.name=${env:UNOMI_HAZELCAST_GROUP_NAME:-cellar} org.apache.unomi.hazelcast.group.password=${env:UNOMI_HAZELCAST_GROUP_PASSWORD:-pass} # This list can be comma separated and use ranges such as 192.168.1.0-7,192.168.1.21 org.apache.unomi.hazelcast.tcp-ip.members=${env:UNOMI_HAZELCAST_TCPIP_MEMBERS:-127.0.0.1} -org.apache.unomi.hazelcast.tcp-ip.interface=${env:UNOMI_HAZELCAST_TCPIP_INTERFACE:-127.0.0.1} org.apache.unomi.hazelcast.network.port=${env:UNOMI_HAZELCAST_NETWORK_PORT:-5701} ### http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/4b447c20/services/src/main/resources/hazelcast.xml -- diff --git a/services/src/main/resources/hazelcast.xml b/services/src/main/resources/hazelcast.xml index e1cc29a..2179c92 100644 --- a/services/src/main/resources/hazelcast.xml +++ b/services/src/main/resources/hazelcast.xml @@ -42,7 +42,6 @@ ${org.apache.unomi.hazelcast.tcp-ip.members} - ${org.apache.unomi.hazelcast.tcp-ip.interface} my-access-key
incubator-unomi git commit: UNOMI-216 Centralize configuration in unomi.properties - Update documentation to point to centralized configuration whenever possible.
Repository: incubator-unomi Updated Branches: refs/heads/master c569f6396 -> 252cca81e UNOMI-216 Centralize configuration in unomi.properties - Update documentation to point to centralized configuration whenever possible. Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/252cca81 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/252cca81 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/252cca81 Branch: refs/heads/master Commit: 252cca81e3d2294a2368fba2235c3a8c21c5b209 Parents: c569f63 Author: Serge Huber Authored: Sat Dec 15 16:18:01 2018 +0100 Committer: Serge Huber Committed: Sat Dec 15 16:18:01 2018 +0100 -- manual/src/main/asciidoc/clustering.adoc| 70 ++- manual/src/main/asciidoc/configuration.adoc | 181 --- .../connectors/mailchimp-connector.adoc | 10 +- .../connectors/salesforce-connector.adoc| 18 +- manual/src/main/asciidoc/extending-plugins.adoc | 16 +- manual/src/main/asciidoc/getting-started.adoc | 7 +- 6 files changed, 155 insertions(+), 147 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/252cca81/manual/src/main/asciidoc/clustering.adoc -- diff --git a/manual/src/main/asciidoc/clustering.adoc b/manual/src/main/asciidoc/clustering.adoc index 0abc1f5..be27ccf 100644 --- a/manual/src/main/asciidoc/clustering.adoc +++ b/manual/src/main/asciidoc/clustering.adoc @@ -14,70 +14,26 @@ === Cluster setup Apache Karaf relies on Apache Karaf Cellar, which in turn uses Hazelcast to discover and configure its cluster. -You just need to install multiple context servers on the same network, and then (optionally) change the Hazelcast - configuration in the following file : -[source] - -etc/hazelcast.xml - - -All nodes on the same network, sharing the same cluster name will be part of the same cluster. - -For the actual ElasticSearch configuration however, this must be done using the following file: - -[source] - -etc/org.apache.unomi.persistence.elasticsearch.cfg - - -Depending on the cluster size, you will want to adjust the following parameters to make sure your setup is optimal in -terms of performance and safety. - - 2 nodes configuration +You can control most of the important clustering settings through the centralized configuration file at -One node dedicated to context server, 1 node for elasticsearch storage. +etc/unomi.custom.system.properties -Node A : +And notably using the following properties: -[source] - -numberOfReplicas=0 -monthlyIndex.numberOfReplicas=0 - + org.apache.unomi.hazelcast.group.name=${env:UNOMI_HAZELCAST_GROUP_NAME:-cellar} + org.apache.unomi.hazelcast.group.password=${env:UNOMI_HAZELCAST_GROUP_PASSWORD:-pass} +# This list can be comma separated and use ranges such as 192.168.1.0-7,192.168.1.21 + org.apache.unomi.hazelcast.tcp-ip.members=${env:UNOMI_HAZELCAST_TCPIP_MEMBERS:-127.0.0.1} + org.apache.unomi.hazelcast.tcp-ip.interface=${env:UNOMI_HAZELCAST_TCPIP_INTERFACE:-127.0.0.1} + org.apache.unomi.hazelcast.network.port=${env:UNOMI_HAZELCAST_NETWORK_PORT:-5701} -Node B : +If you need more fine-grained control over the Hazelcast configuration you could also edit the following file: [source] -numberOfReplicas=0 -monthlyIndex.numberOfReplicas=0 - - - 3 nodes configuration - -One node dedicated to context server, 2 nodes for elasticsearch storage with fault-tolerance - -Node A : - -[source] - -numberOfReplicas=1 -monthlyIndex.numberOfReplicas=1 - - -Node B : - -[source] - -numberOfReplicas=1 -monthlyIndex.numberOfReplicas=1 +etc/hazelcast.xml -Node C : - -[source] - -numberOfReplicas=1 -monthlyIndex.numberOfReplicas=1 - \ No newline at end of file +Note that it would be best to keep all configuration in the centralized custom configuration, for example by adding +placeholders in the hazelcast.xml file if need be and adding the properties to the centralized configuration file. http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/252cca81/manual/src/main/asciidoc/configuration.adoc -- diff --git a/manual/src/main/asciidoc/configuration.adoc b/manual/src/main/asciidoc/configuration.adoc index 3b628fc..fac9e0d 100644 --- a/manual/src/main/asciidoc/configuration.adoc +++ b/manual/src/main/asciidoc/configuration.adoc @@ -13,14 +13,48 @@ // === Configuration - Changing the default configuration + Centralized configuration + +Apache Unomi uses a centralized configuration file that contains both system properties and configuration
incubator-unomi git commit: UNOMI-216 Centralize configuration in unomi.properties - Simplify configuration by just using a system properties file instead of a custom.properties file
Repository: incubator-unomi Updated Branches: refs/heads/master b873b35a2 -> c569f6396 UNOMI-216 Centralize configuration in unomi.properties - Simplify configuration by just using a system properties file instead of a custom.properties file Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/c569f639 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/c569f639 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/c569f639 Branch: refs/heads/master Commit: c569f6396c284660bf634d490f12d2f3d390a1b6 Parents: b873b35 Author: Serge Huber Authored: Thu Dec 13 20:28:30 2018 +0100 Committer: Serge Huber Committed: Thu Dec 13 20:28:30 2018 +0100 -- manual/src/main/asciidoc/configuration.adoc | 16 +- .../src/main/resources/etc/custom.properties| 1 - .../main/resources/etc/custom.system.properties | 289 + package/src/main/resources/etc/unomi.properties | 309 --- 4 files changed, 297 insertions(+), 318 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c569f639/manual/src/main/asciidoc/configuration.adoc -- diff --git a/manual/src/main/asciidoc/configuration.adoc b/manual/src/main/asciidoc/configuration.adoc index 3a73c7f..3b628fc 100644 --- a/manual/src/main/asciidoc/configuration.adoc +++ b/manual/src/main/asciidoc/configuration.adoc @@ -15,9 +15,12 @@ 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. +If you want to change the default configuration, you can perform any modification you want in the $MY_KARAF_HOME/etc/unomi.custom.system.properties file. +By default this file does not exist and is designed to be a file that will contain only your custom modifications to the +default configuration. -If you want to change the HTTP ports that the server is listening on, you will need to add/change the following lines in the $MY_KARAF_HOME/etc/custom.properties file: +For example, if you want to change the HTTP ports that the server is listening on, you will need to add/change the +following lines in the $MY_KARAF_HOME/etc/unomi.custom.system.properties file: [source] @@ -25,15 +28,12 @@ org.osgi.service.http.port.secure=9443 org.osgi.service.http.port=8181 -If you change these ports, also make sure you adjust the following file in the cluster configuration. - -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 : +If you change these ports, also make sure you adjust the following settings in the same file : [source] -contextserver.publicAddress=https://localhost:9443 -contextserver.internalAddress=http://127.0.0.1:8181 +org.apache.unomi.public.address=http://localhost:8181 +org.apache.unomi.internal.address=https://localhost:9443 If you need to specify an Elasticsearch cluster name, or a host and port that are different than the default, http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c569f639/package/src/main/resources/etc/custom.properties -- diff --git a/package/src/main/resources/etc/custom.properties b/package/src/main/resources/etc/custom.properties index 7db6f03..9cc6a7d 100644 --- a/package/src/main/resources/etc/custom.properties +++ b/package/src/main/resources/etc/custom.properties @@ -21,7 +21,6 @@ # All the values specified here will override the default values given # in config.properties. # -${includes}=unomi.properties karaf.systemBundlesStartLevel=50 http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c569f639/package/src/main/resources/etc/custom.system.properties -- diff --git a/package/src/main/resources/etc/custom.system.properties b/package/src/main/resources/etc/custom.system.properties index 98f5da4..3e3dfeb 100644 --- a/package/src/main/resources/etc/custom.system.properties +++ b/package/src/main/resources/etc/custom.system.properties @@ -32,3 +32,292 @@ org.apache.unomi.hazelcast.network.port=${env:UNOMI_HAZELCAST_NETWORK_PORT:-5701 ## Security settings ## ### org.apache.unomi.security.root.password=${env:UNOMI_ROOT_PASSWORD:-karaf} +
incubator-unomi git commit: UNOMI-216 Centralize configuration in unomi.properties - In this commit we centralize all configuration in the unomi.properties and custom.system.properties file, and use p
Repository: incubator-unomi Updated Branches: refs/heads/master 099abb02b -> b873b35a2 UNOMI-216 Centralize configuration in unomi.properties - In this commit we centralize all configuration in the unomi.properties and custom.system.properties file, and use placeholders that reference environment properties to be able to read values from environment properties if they are setup. Users should not modify these files however, and should create a unomi.custom.properties and a unomi.custom.system.properties files to override the default values or use the new environment variables to modify any settings. - Upgraded to Karaf 4.1.7 because we need a bugfix to be able to use placeholders in the system properties configuration files (this was fixed in Karaf 4.1.6 but we moved to the latest minor update). Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/b873b35a Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/b873b35a Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/b873b35a Branch: refs/heads/master Commit: b873b35a208a53b607d3e0928ec46c975d2024ff Parents: 099abb0 Author: Serge Huber Authored: Thu Dec 13 18:07:17 2018 +0100 Committer: Serge Huber Committed: Thu Dec 13 18:07:17 2018 +0100 -- .../resources/org.apache.unomi.geonames.cfg | 6 +- .../main/resources/org.apache.unomi.router.cfg | 30 +- .../main/resources/org.apache.unomi.sfdc.cfg| 24 +- .../org.apache.unomi.mailchimpconnector.cfg | 8 +- .../org.apache.unomi.weatherUpdate.cfg | 6 +- .../java/org/apache/unomi/itests/BaseIT.java| 6 +- .../src/main/resources/etc/custom.properties| 7 +- .../main/resources/etc/custom.system.properties | 34 ++ .../main/resources/etc/org.apache.cxf.osgi.cfg | 2 +- .../resources/etc/org.apache.karaf.jaas.cfg | 63 .../resources/etc/org.apache.karaf.shell.cfg| 20 +- .../resources/etc/org.ops4j.pax.logging.cfg | 14 +- .../main/resources/etc/org.ops4j.pax.web.cfg| 20 ++ package/src/main/resources/etc/unomi.properties | 309 +++ package/src/main/resources/etc/users.properties | 33 ++ ...g.apache.unomi.persistence.elasticsearch.cfg | 30 +- .../resources/org.apache.unomi.plugins.mail.cfg | 10 +- .../org.apache.unomi.plugins.request.cfg| 18 +- pom.xml | 2 +- services/src/main/resources/hazelcast.xml | 9 +- .../main/resources/org.apache.unomi.cluster.cfg | 8 +- .../resources/org.apache.unomi.services.cfg | 22 +- .../resources/org.apache.unomi.thirdparty.cfg | 6 +- wab/src/main/resources/org.apache.unomi.web.cfg | 8 +- 24 files changed, 576 insertions(+), 119 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/extensions/geonames/services/src/main/resources/org.apache.unomi.geonames.cfg -- diff --git a/extensions/geonames/services/src/main/resources/org.apache.unomi.geonames.cfg b/extensions/geonames/services/src/main/resources/org.apache.unomi.geonames.cfg index 625e535..f512d38 100644 --- a/extensions/geonames/services/src/main/resources/org.apache.unomi.geonames.cfg +++ b/extensions/geonames/services/src/main/resources/org.apache.unomi.geonames.cfg @@ -15,8 +15,8 @@ # limitations under the License. # -request.geonamesDatabase.location=${karaf.etc}/allCountries.zip -request.geonamesDatabase.forceImport=false +request.geonamesDatabase.location=${org.apache.unomi.geonames.location:-${karaf.etc}/allCountries.zip} +request.geonamesDatabase.forceImport=${org.apache.unomi.geonames.forceImport:-false} # The interval in milliseconds to use to check if the database is ready to be loaded -service.geonames.refresh.interval=5000 +service.geonames.refresh.interval=${org.apache.unomi.geonames.refresh.interval:-5000} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b873b35a/extensions/router/router-core/src/main/resources/org.apache.unomi.router.cfg -- diff --git a/extensions/router/router-core/src/main/resources/org.apache.unomi.router.cfg b/extensions/router/router-core/src/main/resources/org.apache.unomi.router.cfg index 6d5f985..7a87050 100644 --- a/extensions/router/router-core/src/main/resources/org.apache.unomi.router.cfg +++ b/extensions/router/router-core/src/main/resources/org.apache.unomi.router.cfg @@ -16,28 +16,26 @@ # #Configuration Type values {'nobroker', 'kafka'} -router.config.type=nobroker +router.config.type=${org.apache.unomi.router.config.type:-nobroker} -#Uncomment and update Kafka settings to use Kafka as a broker - -#Kafka -#kafka.host=localhost
incubator-unomi git commit: UNOMI-187 Integrate analytics.js - Remove language parameter as it seems to cause problems and is not really used.
Repository: incubator-unomi Updated Branches: refs/heads/master 0c24a0272 -> 099abb02b UNOMI-187 Integrate analytics.js - Remove language parameter as it seems to cause problems and is not really used. Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/099abb02 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/099abb02 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/099abb02 Branch: refs/heads/master Commit: 099abb02b7df05e601861d4a9ff9e5a9b35dc214 Parents: 0c24a02 Author: Serge Huber Authored: Fri Dec 7 10:28:04 2018 +0100 Committer: Serge Huber Committed: Fri Dec 7 10:28:04 2018 +0100 -- extensions/web-tracker/wab/src/main/webapp/index.html | 3 +-- manual/src/main/asciidoc/installing-tracker.adoc | 4 2 files changed, 1 insertion(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/099abb02/extensions/web-tracker/wab/src/main/webapp/index.html -- diff --git a/extensions/web-tracker/wab/src/main/webapp/index.html b/extensions/web-tracker/wab/src/main/webapp/index.html index 9809a34..c92bb62 100644 --- a/extensions/web-tracker/wab/src/main/webapp/index.html +++ b/extensions/web-tracker/wab/src/main/webapp/index.html @@ -50,8 +50,7 @@ pageInfo: { destinationURL: location.href, tags: ["tag1", "tag2", "tag3"], -categories: ["category1", "category2", "category3"] /*, -language: "en" */ +categories: ["category1", "category2", "category3"] }, interests: { "interest1": 1, http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/099abb02/manual/src/main/asciidoc/installing-tracker.adoc -- diff --git a/manual/src/main/asciidoc/installing-tracker.adoc b/manual/src/main/asciidoc/installing-tracker.adoc index 4314f89..186774d 100644 --- a/manual/src/main/asciidoc/installing-tracker.adoc +++ b/manual/src/main/asciidoc/installing-tracker.adoc @@ -62,7 +62,6 @@ to this : destinationURL: location.href, tags : [ "tag1", "tag2", "tag3"], categories : ["category1", "category2", "category3"], -language : "en" }, interests : { "interest1" : 1, @@ -98,9 +97,6 @@ object passed to the unomiTracker call. Default value : page path |referringURL |The referringURL also known as the previous URL of the page/screen viewed. Default value : page referrer URL -|language -|An identifier (usually a locale for such as en_US or fr_CH) for the language - |tags |A String array of tag identifiers. For example `['tag1', 'tag2', 'tag3']`
incubator-unomi git commit: UNOMI-215 New rule monitoring commands & other new commands - Refactor commands to use new style for Karaf 4 - Tried to remove Blueprint but was a little too complex becaus
Repository: incubator-unomi Updated Branches: refs/heads/master e5075636d -> 0c24a0272 UNOMI-215 New rule monitoring commands & other new commands - Refactor commands to use new style for Karaf 4 - Tried to remove Blueprint but was a little too complex because of some of the initialization that is done. Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/0c24a027 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/0c24a027 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/0c24a027 Branch: refs/heads/master Commit: 0c24a0272f176ff721fb8bd72473796d219d160b Parents: e507563 Author: Serge Huber Authored: Tue Dec 4 11:14:10 2018 +0100 Committer: Serge Huber Committed: Tue Dec 4 11:14:10 2018 +0100 -- tools/shell-commands/pom.xml| 14 ++ .../org/apache/unomi/shell/actions/Start.java | 18 .../org/apache/unomi/shell/actions/Stop.java| 17 +++ .../org/apache/unomi/shell/actions/Version.java | 15 -- .../apache/unomi/shell/migration/Migration.java | 6 +-- .../unomi/shell/migration/actions/Migrate.java | 48 .../shell/migration/impl/MigrationTo121.java| 8 ++-- .../shell/migration/impl/MigrationTo122.java| 8 ++-- .../shell/migration/utils/ConsoleUtils.java | 20 .../unomi/shell/migration/utils/HttpUtils.java | 4 +- .../resources/OSGI-INF/blueprint/blueprint.xml | 30 +--- 11 files changed, 108 insertions(+), 80 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/0c24a027/tools/shell-commands/pom.xml -- diff --git a/tools/shell-commands/pom.xml b/tools/shell-commands/pom.xml index 28eff70..d4e533f 100644 --- a/tools/shell-commands/pom.xml +++ b/tools/shell-commands/pom.xml @@ -75,4 +75,18 @@ + + + +org.apache.felix +maven-bundle-plugin + + +* + + + + + + http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/0c24a027/tools/shell-commands/src/main/java/org/apache/unomi/shell/actions/Start.java -- diff --git a/tools/shell-commands/src/main/java/org/apache/unomi/shell/actions/Start.java b/tools/shell-commands/src/main/java/org/apache/unomi/shell/actions/Start.java index 8f7530e..5909d99 100644 --- a/tools/shell-commands/src/main/java/org/apache/unomi/shell/actions/Start.java +++ b/tools/shell-commands/src/main/java/org/apache/unomi/shell/actions/Start.java @@ -16,22 +16,22 @@ */ package org.apache.unomi.shell.actions; -import org.apache.karaf.shell.commands.Command; -import org.apache.karaf.shell.console.OsgiCommandSupport; +import org.apache.karaf.shell.api.action.Action; +import org.apache.karaf.shell.api.action.Command; +import org.apache.karaf.shell.api.action.lifecycle.Reference; +import org.apache.karaf.shell.api.action.lifecycle.Service; import org.apache.unomi.shell.services.UnomiManagementService; @Command(scope = "unomi", name = "start", description = "This will start Apache Unomi") -public class Start extends OsgiCommandSupport { +@Service +public class Start implements Action { -private UnomiManagementService unomiManagementService; +@Reference +UnomiManagementService unomiManagementService; -protected Object doExecute() throws Exception { +public Object execute() throws Exception { unomiManagementService.startUnomi(); - return null; } -public void setUnomiManagementService(UnomiManagementService unomiManagementService) { -this.unomiManagementService = unomiManagementService; -} } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/0c24a027/tools/shell-commands/src/main/java/org/apache/unomi/shell/actions/Stop.java -- diff --git a/tools/shell-commands/src/main/java/org/apache/unomi/shell/actions/Stop.java b/tools/shell-commands/src/main/java/org/apache/unomi/shell/actions/Stop.java index d612cdc..8b8cad5 100644 --- a/tools/shell-commands/src/main/java/org/apache/unomi/shell/actions/Stop.java +++ b/tools/shell-commands/src/main/java/org/apache/unomi/shell/actions/Stop.java @@ -16,22 +16,23 @@ */ package org.apache.unomi.shell.actions; -import org.apache.karaf.shell.commands.Command; -import org.apache.karaf.shell.console.OsgiCommandSupport; +import org.apache.karaf.shell.api.action.Action; +import org.apache.karaf.shell.api.action.Command; +import
[2/2] incubator-unomi git commit: UNOMI-215 New rule monitoring commands & other new commands - Refactor commands to use new style - Remove blueprint - Rename commands to remove "Command" at the end o
UNOMI-215 New rule monitoring commands & other new commands - Refactor commands to use new style - Remove blueprint - Rename commands to remove "Command" at the end of the name Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/e5075636 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/e5075636 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/e5075636 Branch: refs/heads/master Commit: e5075636dac6672bbae66d33c5e6b4e7379e Parents: ac1ce57 Author: Serge Huber Authored: Mon Dec 3 17:31:09 2018 +0100 Committer: Serge Huber Committed: Mon Dec 3 17:31:09 2018 +0100 -- tools/shell-dev-commands/pom.xml| 14 + .../apache/unomi/shell/commands/ActionList.java | 64 .../unomi/shell/commands/ActionListCommand.java | 64 .../apache/unomi/shell/commands/ActionView.java | 48 +++ .../unomi/shell/commands/ActionViewCommand.java | 50 .../unomi/shell/commands/ConditionList.java | 64 .../shell/commands/ConditionListCommand.java| 64 .../unomi/shell/commands/ConditionView.java | 50 .../shell/commands/ConditionViewCommand.java| 51 .../unomi/shell/commands/DeployDefinition.java | 292 ++ .../shell/commands/DeployDefinitionCommand.java | 293 --- .../apache/unomi/shell/commands/EventTail.java | 94 ++ .../unomi/shell/commands/EventTailCommand.java | 92 -- .../apache/unomi/shell/commands/EventView.java | 60 .../unomi/shell/commands/EventViewCommand.java | 63 .../shell/commands/ListCommandSupport.java | 9 +- .../unomi/shell/commands/ProfileList.java | 78 + .../shell/commands/ProfileListCommand.java | 80 - .../unomi/shell/commands/ProfileView.java | 48 +++ .../shell/commands/ProfileViewCommand.java | 49 .../apache/unomi/shell/commands/RuleList.java | 108 +++ .../unomi/shell/commands/RuleListCommand.java | 110 --- .../unomi/shell/commands/RuleResetStats.java| 38 +++ .../shell/commands/RuleResetStatsCommand.java | 38 --- .../apache/unomi/shell/commands/RuleTail.java | 93 ++ .../unomi/shell/commands/RuleTailCommand.java | 91 -- .../apache/unomi/shell/commands/RuleView.java | 48 +++ .../unomi/shell/commands/RuleViewcommand.java | 49 .../apache/unomi/shell/commands/RuleWatch.java | 110 +++ .../unomi/shell/commands/RuleWatchCommand.java | 108 --- .../unomi/shell/commands/SegmentList.java | 73 + .../shell/commands/SegmentListCommand.java | 73 - .../unomi/shell/commands/SegmentView.java | 48 +++ .../shell/commands/SegmentViewCommand.java | 50 .../unomi/shell/commands/SessionList.java | 79 + .../shell/commands/SessionListCommand.java | 80 - .../unomi/shell/commands/SessionView.java | 48 +++ .../shell/commands/SessionViewCommand.java | 48 --- .../shell/commands/TailCommandSupport.java | 17 +- .../resources/OSGI-INF/blueprint/blueprint.xml | 134 - 40 files changed, 1473 insertions(+), 1597 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e5075636/tools/shell-dev-commands/pom.xml -- diff --git a/tools/shell-dev-commands/pom.xml b/tools/shell-dev-commands/pom.xml index a89f86f..abc79e9 100644 --- a/tools/shell-dev-commands/pom.xml +++ b/tools/shell-dev-commands/pom.xml @@ -114,4 +114,18 @@ + + + +org.apache.felix +maven-bundle-plugin + + +* + + + + + + http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e5075636/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/ActionList.java -- diff --git a/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/ActionList.java b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/ActionList.java new file mode 100644 index 000..7839cb7 --- /dev/null +++ b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/ActionList.java @@ -0,0 +1,64 @@ +/* + * 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
[1/2] incubator-unomi git commit: UNOMI-215 New rule monitoring commands & other new commands - Refactor commands to use new style - Remove blueprint - Rename commands to remove "Command" at the end o
Repository: incubator-unomi Updated Branches: refs/heads/master ac1ce5791 -> e5075636d http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e5075636/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/RuleList.java -- diff --git a/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/RuleList.java b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/RuleList.java new file mode 100644 index 000..de5a4d8 --- /dev/null +++ b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/RuleList.java @@ -0,0 +1,108 @@ +/* + * 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.shell.commands; + +import org.apache.commons.lang3.StringUtils; +import org.apache.karaf.shell.api.action.Argument; +import org.apache.karaf.shell.api.action.Command; +import org.apache.karaf.shell.api.action.lifecycle.Reference; +import org.apache.karaf.shell.api.action.lifecycle.Service; +import org.apache.unomi.api.Metadata; +import org.apache.unomi.api.PartialList; +import org.apache.unomi.api.conditions.Condition; +import org.apache.unomi.api.query.Query; +import org.apache.unomi.api.rules.RuleStatistics; +import org.apache.unomi.api.services.DefinitionsService; +import org.apache.unomi.api.services.RulesService; +import org.apache.unomi.common.DataTable; + +import java.util.ArrayList; +import java.util.Map; + +@Command(scope = "unomi", name = "rule-list", description = "This will list all the rules deployed in the Apache Unomi Context Server") +@Service +public class RuleList extends ListCommandSupport { + +@Reference +RulesService rulesService; + +@Reference +DefinitionsService definitionsService; + +@Argument(index = 0, name = "maxEntries", description = "The maximum number of entries to retrieve (defaults to 100)", required = false, multiValued = false) +int maxEntries = 100; + +@Override +protected String[] getHeaders() { +return new String[] { +"Activated", +"Hidden", +"Read-only", +"Identifier", +"Scope", +"Name", +"Tags", +"System tags", +"Executions", +"Conditions [ms]", +"Actions [ms]" +}; +} + +@Override +protected DataTable buildDataTable() { +Query query = new Query(); +Condition matchAllCondition = new Condition(definitionsService.getConditionType("matchAllCondition")); +query.setCondition(matchAllCondition); +query.setLimit(maxEntries); +PartialList ruleMetadatas = rulesService.getRuleMetadatas(query); +if (ruleMetadatas.getList().size() != ruleMetadatas.getTotalSize()) { +System.out.println("WARNING : Only the first " + ruleMetadatas.getPageSize() + " rules have been retrieved, there are " + ruleMetadatas.getTotalSize() + " rules registered in total. Use the maxEntries parameter to retrieve more rules"); +} +Map allRuleStatistics = rulesService.getAllRuleStatistics(); + +DataTable dataTable = new DataTable(); +for (Metadata ruleMetadata : ruleMetadatas.getList()) { +ArrayList rowData = new ArrayList<>(); +String ruleId = ruleMetadata.getId(); +rowData.add(ruleMetadata.isEnabled() ? "x" : ""); +rowData.add(ruleMetadata.isHidden() ? "x" : ""); +rowData.add(ruleMetadata.isReadOnly() ? "x" : ""); +rowData.add(ruleId); +rowData.add(ruleMetadata.getScope()); +rowData.add(ruleMetadata.getName()); +rowData.add(StringUtils.join(ruleMetadata.getTags(), ",")); +rowData.add(StringUtils.join(ruleMetadata.getSystemTags(), ",")); +RuleStatistics ruleStatistics = allRuleStatistics.get(ruleId); +if (ruleStatistics != null) { +rowData.add(ruleStatistics.getExecutionCount()); +rowData.add(ruleStatistics.getConditionsTime()); +rowData.add(ruleStatistics.getActionsTime()); +} else { +
[1/3] incubator-unomi git commit: UNOMI-187 Integrate analytics.js - Fix tracking of tags and categories on initial page tracking call
Repository: incubator-unomi Updated Branches: refs/heads/master f67674e89 -> ac1ce5791 http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ac1ce579/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 a619263..6ed3ddc 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 @@ -572,7 +572,7 @@ Unomi.prototype.extractFormData = function (form) { } break; default: -if (!e.value || e.value == '') { +if (!e.value || e.value === '') { // ignore element if no value is provided break; }
[3/3] incubator-unomi git commit: UNOMI-187 Integrate analytics.js - Fix tracking of tags and categories on initial page tracking call
UNOMI-187 Integrate analytics.js - Fix tracking of tags and categories on initial page tracking call Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/ac1ce579 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/ac1ce579 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/ac1ce579 Branch: refs/heads/master Commit: ac1ce5791c252fb04cdd24b0e70c7bbd55a40692 Parents: f67674e Author: Serge Huber Authored: Thu Nov 29 20:55:23 2018 +0100 Committer: Serge Huber Committed: Thu Nov 29 20:55:23 2018 +0100 -- extensions/web-tracker/javascript/dist/unomi-tracker.js | 4 +++- extensions/web-tracker/javascript/dist/unomi-tracker.min.js | 4 ++-- .../javascript/src/analytics.js-integration-apache-unomi.js | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ac1ce579/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 fc4da6e..34481a6 100644 --- a/extensions/web-tracker/javascript/dist/unomi-tracker.js +++ b/extensions/web-tracker/javascript/dist/unomi-tracker.js @@ -13084,7 +13084,7 @@ Unomi.prototype.extractFormData = function (form) { } break; default: -if (!e.value || e.value == '') { +if (!e.value || e.value === '') { // ignore element if no value is provided break; } @@ -13105,6 +13105,8 @@ Unomi.prototype.extractFormData = function (form) { } } break; +default: +console.log("unomiTracker: " + e.nodeName + " form element type not implemented and will not be tracked."); } } }
[2/3] incubator-unomi git commit: UNOMI-187 Integrate analytics.js - Fix tracking of tags and categories on initial page tracking call
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ac1ce579/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 9b7a5dc..4ef5405 100644 --- a/extensions/web-tracker/javascript/dist/unomi-tracker.min.js +++ b/extensions/web-tracker/javascript/dist/unomi-tracker.min.js @@ -24,5 +24,5 @@ * @copyright 2013-2014 Enrico Marino / Jordan Harband * @license MIT */ -var r,o=Object.prototype,i=o.hasOwnProperty,a=o.toString;"function"==typeof Symbol&&(r=Symbol.prototype.valueOf);var s=function(t){return t!==t},c={boolean:1,number:1,string:1,undefined:1},u=/^([A-Za-z0-9+\/]{4})*([A-Za-z0-9+\/]{4}|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{2}==)$/,l=/^[A-Fa-f0-9]+$/,p={};p.a=p.type=function(t,e){return typeof t===e},p.defined=function(t){return void 0!==t},p.empty=function(t){var e,n=a.call(t);if("[object Array]"===n||"[object Arguments]"===n||"[object String]"===n)return 0===t.length;if("[object Object]"===n){for(e in t)if(i.call(t,e))return!1;return!0}return!t},p.equal=function(t,e){if(t===e)return!0;var n,r=a.call(t);if(r!==a.call(e))return!1;if("[object Object]"===r){for(n in t)if(!(p.equal(t[n],e[n])& in e))return!1;for(n in e)if(!(p.equal(t[n],e[n])& in t))return!1;return!0}if("[object Array]"===r){if((n=t.length)!==e.length)return!1;for(;n--;)if(!p.equal(t[n],e[n]))return!1;return!0}return"[object Function]"===r?t.prototype===e.prototype:"[object Date]"===r&()===e.getTime()},p.hosted=function(t,e){var n=typeof e[t];return"object"===n?!!e[t]:!c[n]},p.instance=p.instanceof=function(t,e){return t instanceof e},p.nil=p.null=function(t){return null===t},p.undef=p.undefined=function(t){return void 0===t},p.args=p.arguments=function(t){var e="[object Arguments]"===a.call(t),n=!p.array(t)&(t)&(t)&(t.callee);return e||n},p.array=Array.isArray||function(t){return"[object Array]"===a.call(t)},p.args.empty=function(t){return p.args(t)&&0===t.length},p.array.empty=function(t){return p.array(t)&&0===t.length},p.arraylike=function(t){return!!t&&!p.bool(t)&(t,"length")&(t.length)&(t.length)&>=0},p.bool=p.boolean=function(t){return"[object Boolean]"===a.call(t)},p.false=function(t){return p.bool(t)&&!1===Boolean(Number(t))},p.true=function(t){return p.bool(t)&&!0===Boolean(Number(t))},p.date=function(t){return"[object Date]"===a.call(t)},p.date.valid=function(t){return p. date(t)&&!isNaN(Number(t))},p.element=function(t){return void 0!==t&&"undefined"!=typeof HTMLElement& instanceof HTMLElement&&1===t.nodeType},p.error=function(t){return"[object Error]"===a.call(t)},p.fn=p.function=function(t){if("undefined"!=typeof window&===window.alert)return!0;var e=a.call(t);return"[object Function]"===e||"[object GeneratorFunction]"===e||"[object AsyncFunction]"===e},p.number=function(t){return"[object Number]"===a.call(t)},p.infinite=function(t){return t===1/0||t===-1/0},p.decimal=function(t){return p.number(t)&&!s(t)&&!p.infinite(t)&%1!=0},p.divisibleBy=function(t,e){var n=p.infinite(t),r=p.infinite(e),o=p.number(t)&&!s(t)&(e)&&!s(e)&&0!==e;return n||r||o&%e==0},p.integer=p.int=function(t){return p.number(t)&&!s(t)&%1==0},p.maximum=function(t,e){if(s(t))throw new TypeError("NaN is not a valid value");if(!p.arraylike(e))throw new TypeError("second argument must be array-like");for(var n=e.length;--n>=0;)if(t=0;)if(t>e[n])return!1;return!0},p.nan=function(t){return!p.number(t)||t!==t},p.even=function(t){return p.infinite(t)||p.number(t)&===t&%2==0},p.odd=function(t){return p.infinite(t)||p.number(t)&===t&%2!=0},p.ge=function(t,e){if(s(t)||s(e))throw new TypeError("NaN is not a valid value");return!p.infinite(t)&&!p.infinite(e)&>=e},p.gt=function(t,e){if(s(t)||s(e))throw new TypeError("NaN is not a valid value");return!p.infinite(t)&&!p.infinite(e)&>e},p.le=function(t,e){if(s(t)||s(e))throw new TypeError("NaN is not a valid value");return!p.infinite(t)&&!p.infinite(e)&<=e},p.lt=function(t,e){if(s(t)||s(e))throw new TypeError("NaN is not a valid value");return!p.infinite(t)&&!p.infinite(e)&=e&<=n},p.object=function(t){return"[object Object]"===a.call(t)},p.primitive=function(t){return!t||!("object"==typeof t||p.object(t)||p.fn(t)||p.array(t))},p.hash=function(t){return p.object(t)&===Object&&!t.nodeType&&!t.setInterval},p.regexp=function(t){return"[object RegExp]"===a.call(t)},p.string=function(t){return"[object String]"===a.call(t)},p.base64=function(t){return p.string(t)&&(!t.length||u.test(t))},p.hex=function(t){return p.string(t)&&(!t.length||l.test(t))},p.symbol=function(t){return"function"==typeof Symbol&&"[object Symbol]"===a.call(t)&&"symbol"==typeof r.call(t)},e.exports=p},{}],66:[function(e,n,r){(function(e){(function(){function o(t,e){function n(t){if(n[t]!==g)return n[t];var o;if("bug-string-char-index"==t)o="a"!="a"[0];else
incubator-unomi git commit: UNOMI-215 New rule monitoring commands & other new commands - New condition list & view shell commands - New rule tail & rule shell commands
Repository: incubator-unomi Updated Branches: refs/heads/master ac325f945 -> f67674e89 UNOMI-215 New rule monitoring commands & other new commands - New condition list & view shell commands - New rule tail & rule shell commands Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/f67674e8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/f67674e8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/f67674e8 Branch: refs/heads/master Commit: f67674e896cf1532a359600a62f8c1c7859b438e Parents: ac325f9 Author: Serge Huber Authored: Thu Nov 29 20:53:52 2018 +0100 Committer: Serge Huber Committed: Thu Nov 29 20:53:52 2018 +0100 -- .../unomi/api/services/RuleListenerService.java | 61 +++ manual/src/main/asciidoc/shell-commands.adoc| 37 +-- .../services/services/RulesServiceImpl.java | 44 +++- .../resources/OSGI-INF/blueprint/blueprint.xml | 8 ++ .../shell/commands/ConditionListCommand.java| 64 +++ .../shell/commands/ConditionViewCommand.java| 51 + .../unomi/shell/commands/EventTailCommand.java | 59 +++--- .../unomi/shell/commands/RuleListCommand.java | 2 +- .../unomi/shell/commands/RuleTailCommand.java | 91 .../unomi/shell/commands/RuleWatchCommand.java | 108 +++ .../shell/commands/TailCommandSupport.java | 99 + .../resources/OSGI-INF/blueprint/blueprint.xml | 18 12 files changed, 587 insertions(+), 55 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f67674e8/api/src/main/java/org/apache/unomi/api/services/RuleListenerService.java -- diff --git a/api/src/main/java/org/apache/unomi/api/services/RuleListenerService.java b/api/src/main/java/org/apache/unomi/api/services/RuleListenerService.java new file mode 100644 index 000..be67f7f --- /dev/null +++ b/api/src/main/java/org/apache/unomi/api/services/RuleListenerService.java @@ -0,0 +1,61 @@ +/* + * 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 org.apache.unomi.api.Event; +import org.apache.unomi.api.rules.Rule; + +/** + * A service that gets called when a rule's conditions are evaluated or when a rule's actions are executed. + */ +public interface RuleListenerService { + +/** + * This enum indicates which type of already raised event we are dealing with + */ +enum AlreadyRaisedFor { +SESSION, +PROFILE +} + +/** + * Called before a rule's conditions are evaluated. Be careful when implemented this listener because rule's condition + * are called in very high frequencies and the performance of this listener might have a huge impact on rule's + * performance + * @param rule the rule that is being evaluated + * @param event the event we are processing and evaluating against the rule + */ +void onEvaluate(Rule rule, Event event); + +/** + * Called when a rule has already been raised either for a session or a profile. + * @param alreadyRaisedFor an enum that indicates if the rule was already raised once for the session or for the + * profile + * @param rule the rule that has already been raised + * @param event the event for which this rule has already been raised. + */ +void onAlreadyRaised(AlreadyRaisedFor alreadyRaisedFor, Rule rule, Event event); + +/** + * Called just before a matching rule's actions are about to be executed. + * @param rule the matching rule for the current event + * @param event the event we are processing that matched the current rule. + */ +void onExecuteActions(Rule rule, Event event); + +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f67674e8/manual/src/main/asciidoc/shell-commands.adoc
[1/3] incubator-unomi git commit: UNOMI-187 Integrate analytics.js - Fix tracking of tags and categories on initial page tracking call
Repository: incubator-unomi Updated Branches: refs/heads/master 45b04c2f0 -> ac325f945 http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ac325f94/extensions/web-tracker/javascript/package.json -- diff --git a/extensions/web-tracker/javascript/package.json b/extensions/web-tracker/javascript/package.json index 39698b9..50149ef 100644 --- a/extensions/web-tracker/javascript/package.json +++ b/extensions/web-tracker/javascript/package.json @@ -21,7 +21,8 @@ }, "dependencies": { "@segment/analytics.js-core": "^3.7.2", -"@segment/analytics.js-integration": "^2.1.1" +"@segment/analytics.js-integration": "^2.1.1", +"extend": "^3.0.2" }, "devDependencies": { "@segment/eslint-config": "^3.1.1", http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ac325f94/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 2553dfa..a619263 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 @@ -17,6 +17,7 @@ 'use strict'; var integration = require('@segment/analytics.js-integration'); +var extend = require('extend'); var Unomi = module.exports = integration('Apache Unomi') .assumesPageview() @@ -111,7 +112,7 @@ Unomi.prototype.fillPageData = function(unomiPage, props) { unomiPage.attributes = []; unomiPage.consentTypes = []; unomiPage.interests = props.interests || {}; -unomiPage.pageInfo = unomiPage.pageInfo || props.pageInfo || {}; +unomiPage.pageInfo = extend({}, unomiPage.pageInfo, props.pageInfo); unomiPage.pageInfo.pageName = unomiPage.pageInfo.pageName || props.title; unomiPage.pageInfo.pageID = unomiPage.pageInfo.pageID || props.path; unomiPage.pageInfo.pagePath = unomiPage.pageInfo.pagePath || props.path; @@ -592,6 +593,8 @@ Unomi.prototype.extractFormData = function (form) { } } break; +default: +console.log("unomiTracker: " + e.nodeName + " form element type not implemented and will not be tracked."); } } } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ac325f94/extensions/web-tracker/javascript/yarn.lock -- diff --git a/extensions/web-tracker/javascript/yarn.lock b/extensions/web-tracker/javascript/yarn.lock index 9054ee1..d0362d3 100644 --- a/extensions/web-tracker/javascript/yarn.lock +++ b/extensions/web-tracker/javascript/yarn.lock @@ -1055,6 +1055,10 @@ extend@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444; +extend@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa; + fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917; http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ac325f94/extensions/web-tracker/wab/src/main/webapp/index.html -- diff --git a/extensions/web-tracker/wab/src/main/webapp/index.html b/extensions/web-tracker/wab/src/main/webapp/index.html index 85437c7..9809a34 100644 --- a/extensions/web-tracker/wab/src/main/webapp/index.html +++ b/extensions/web-tracker/wab/src/main/webapp/index.html @@ -14,10 +14,8 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> -http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;> - -http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> + + Apache Unomi Web Tracker Test Page @@ -43,62 +41,95 @@ +var path = location.pathname + location.hash; var unomiOption = { scope: 'realEstateManager', -url: 'http://localhost:8181' -}; -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) +url: '', // we use an empty URL to make it relative to this page. +initialPageProperties: { +path: path, +pageInfo: { +
[2/3] incubator-unomi git commit: UNOMI-187 Integrate analytics.js - Fix tracking of tags and categories on initial page tracking call
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ac325f94/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 03681c6..9b7a5dc 100644 --- a/extensions/web-tracker/javascript/dist/unomi-tracker.min.js +++ b/extensions/web-tracker/javascript/dist/unomi-tracker.min.js @@ -16,8 +16,8 @@ * * @license Apache-2.0 */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&)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&if(!s&)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 l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){return o(e[a][1][t]||t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&,a=0;ahttp://www.w3.org/1999/xlink","href;)||t.getAttribute("xlink:href");r.track(i,a),s&&"_blank"!==t.target&&!j(o)&&(S(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){S(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):O(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=E(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&(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&(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]&[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&(n.ajs_uid,r),n.ajs_event&(n.ajs _event,o),n.ajs_aid&(n.ajs_aid),this},r.prototype.normalize=function(t){return t=C(t,k(this._integrations)),t.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(){return
incubator-unomi git commit: UNOMI-208 Improve documentation - Fix issues with ElasticSearch X-Pack documentation levels being too high - Added new documentation on useful URLs to know
Repository: incubator-unomi Updated Branches: refs/heads/master 48d4f897d -> 45b04c2f0 UNOMI-208 Improve documentation - Fix issues with ElasticSearch X-Pack documentation levels being too high - Added new documentation on useful URLs to know Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/45b04c2f Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/45b04c2f Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/45b04c2f Branch: refs/heads/master Commit: 45b04c2f065930cb692b5d06186fa451e8e3ebf4 Parents: 48d4f89 Author: Serge Huber Authored: Tue Nov 27 17:13:49 2018 +0100 Committer: Serge Huber Committed: Tue Nov 27 17:13:49 2018 +0100 -- manual/src/main/asciidoc/configuration.adoc | 4 +- manual/src/main/asciidoc/index.adoc | 2 + manual/src/main/asciidoc/useful-unomi-urls.adoc | 83 3 files changed, 87 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/45b04c2f/manual/src/main/asciidoc/configuration.adoc -- diff --git a/manual/src/main/asciidoc/configuration.adoc b/manual/src/main/asciidoc/configuration.adoc index 2c57e83..3a73c7f 100644 --- a/manual/src/main/asciidoc/configuration.adoc +++ b/manual/src/main/asciidoc/configuration.adoc @@ -341,11 +341,11 @@ or the user/password you have setup to protect the system if you have changed it It is now possible to use X-Pack to connect to ElasticSearch. However, for licensing reasons this is not provided out of the box. Here is the procedure to install X-Pack with Apache Unomi: -=== Important ! += Important ! Do not start Unomi directly with unomi:start, perform the following steps below first ! -=== Installation steps += Installation steps . Create a directory for all the JARs that you will download, we will call it XPACK_JARS_DIRECTORY . Download https://artifacts.elastic.co/maven/org/elasticsearch/client/x-pack-transport/5.6.3/x-pack-transport-5.6.3.jar[https://artifacts.elastic.co/maven/org/elasticsearch/client/x-pack-transport/5.6.3/x-pack-transport-5.6.3.jar] to XPACK_JARS_DIRECTORY http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/45b04c2f/manual/src/main/asciidoc/index.adoc -- diff --git a/manual/src/main/asciidoc/index.adoc b/manual/src/main/asciidoc/index.adoc index 7589570..a8c746f 100644 --- a/manual/src/main/asciidoc/index.adoc +++ b/manual/src/main/asciidoc/index.adoc @@ -40,6 +40,8 @@ include::installing-tracker.adoc[] include::configuration.adoc[] +include::useful-unomi-urls.adoc[] + == Integration samples include::samples/samples.adoc[] http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/45b04c2f/manual/src/main/asciidoc/useful-unomi-urls.adoc -- diff --git a/manual/src/main/asciidoc/useful-unomi-urls.adoc b/manual/src/main/asciidoc/useful-unomi-urls.adoc new file mode 100644 index 000..2fe2e17 --- /dev/null +++ b/manual/src/main/asciidoc/useful-unomi-urls.adoc @@ -0,0 +1,83 @@ +// +// 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 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. +// + Useful Apache Unomi URLs + +In this section we will list some useful URLs that can be used to quickly access parts of Apache Unomi that can help +you understand or diagnose what is going on in the system. + +You can of course find more information about the REST API in the http://unomi.apache.org/documentation.html[related section] +in the Apache Unomi website. + +For these requests it can be nice to use a browser (such as Firefox) that understands JSON to make it easier to view the +results as the returned JSON is not beautified (another possiblity is a tool such as Postman). + +Important : all URLs are relative to the private Apache Unomi URL, by default: https://localhost:9443 + +.Useful URLs +|=== +|Path|Method|Description + +|/cxs/profiles/properties +|GET +|Listing deployed properties + +|/cxs/definitions/conditions +|GET +|Listing deployed conditions + +|/cxs/definitions/actions +|GET +|Listing deployed actions + +|/cxs/profiles/PROFILE_ID +|GET +|Dumping a
incubator-unomi git commit: UNOMI-214 Fix integration tests - Fix event tail command that was not printing out to the proper output
Repository: incubator-unomi Updated Branches: refs/heads/master 3bd954931 -> 48d4f897d UNOMI-214 Fix integration tests - Fix event tail command that was not printing out to the proper output Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/48d4f897 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/48d4f897 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/48d4f897 Branch: refs/heads/master Commit: 48d4f897dc2ffc107753cb814a24691d54b7ca3c Parents: 3bd9549 Author: Serge Huber Authored: Tue Nov 27 14:22:33 2018 +0100 Committer: Serge Huber Committed: Tue Nov 27 14:22:33 2018 +0100 -- .../org/apache/unomi/shell/commands/EventTailCommand.java| 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/48d4f897/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/EventTailCommand.java -- diff --git a/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/EventTailCommand.java b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/EventTailCommand.java index 99dead1..811aa5d 100644 --- a/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/EventTailCommand.java +++ b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/EventTailCommand.java @@ -49,9 +49,9 @@ public class EventTailCommand extends OsgiCommandSupport { @Override protected Object doExecute() throws Exception { +// Do not use System.out as it may write to the wrong console depending on the thread that calls our log handler PrintStream out = session.getConsole(); out.flush(); - TailEventListener tailEventListener = new TailEventListener(out); StringBuilder headerLine = new StringBuilder(); @@ -59,8 +59,8 @@ public class EventTailCommand extends OsgiCommandSupport { headerLine.append(getColumn(columnSizes[i], columnHeaders[i])); headerLine.append("|"); } -System.out.println(headerLine.toString()); -System.out.println(StringUtils.repeat("-", headerLine.length())); +out.println(headerLine.toString()); +out.println(StringUtils.repeat("-", headerLine.length())); ServiceRegistration tailServiceRegistration = bundleContext.registerService(EventListenerService.class, tailEventListener, new Hashtable<>()); try { synchronized (this) { @@ -118,7 +118,7 @@ public class EventTailCommand extends OsgiCommandSupport { eventLine.append(getColumn(columnSizes[i], eventInfo.get(i))); eventLine.append("|"); } -System.out.println(eventLine.toString()); +out.println(eventLine.toString()); return EventService.NO_CHANGE; } }
incubator-unomi git commit: UNOMI-214 Fix integration tests
Repository: incubator-unomi Updated Branches: refs/heads/master b8722499a -> 3bd954931 UNOMI-214 Fix integration tests Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/3bd95493 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/3bd95493 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/3bd95493 Branch: refs/heads/master Commit: 3bd954931df40639cabcb56c37359be940c12946 Parents: b872249 Author: Serge Huber Authored: Mon Nov 26 22:30:06 2018 +0100 Committer: Serge Huber Committed: Mon Nov 26 22:30:06 2018 +0100 -- .../core/processor/LineSplitFailureHandler.java | 12 +++- .../java/org/apache/unomi/itests/TestUtils.java | 19 --- 2 files changed, 27 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/3bd95493/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/processor/LineSplitFailureHandler.java -- diff --git a/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/processor/LineSplitFailureHandler.java b/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/processor/LineSplitFailureHandler.java index 78ecf5b..7543e48 100644 --- a/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/processor/LineSplitFailureHandler.java +++ b/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/processor/LineSplitFailureHandler.java @@ -34,7 +34,17 @@ public class LineSplitFailureHandler implements Processor { public void process(Exchange exchange) throws Exception { logger.debug("Route: {}, Error: {}", exchange.getProperty(Exchange.FAILURE_ROUTE_ID), exchange.getProperty(Exchange.EXCEPTION_CAUGHT)); ImportLineError importLineError = new ImportLineError(); -importLineError.setErrorCode(((BadProfileDataFormatException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT)).getCause().getMessage()); +if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) instanceof BadProfileDataFormatException) { +importLineError.setErrorCode(((BadProfileDataFormatException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT)).getCause().getMessage()); +} else if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) instanceof Throwable) { +Throwable rootCause = (Throwable) exchange.getProperty(Exchange.EXCEPTION_CAUGHT); +while (rootCause.getCause() != null) { +rootCause = rootCause.getCause(); +} +importLineError.setErrorCode(rootCause.getMessage()); +} else { + importLineError.setErrorCode(exchange.getProperty(Exchange.EXCEPTION_CAUGHT).toString()); +} importLineError.setLineContent(exchange.getIn().getBody(String.class)); importLineError.setLineNb(((Integer) exchange.getProperty("CamelSplitIndex") + 1)); exchange.getIn().setHeader(RouterConstants.HEADER_FAILED_MESSAGE, new Boolean(true)); http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/3bd95493/itests/src/test/java/org/apache/unomi/itests/TestUtils.java -- diff --git a/itests/src/test/java/org/apache/unomi/itests/TestUtils.java b/itests/src/test/java/org/apache/unomi/itests/TestUtils.java index d98d394..7cc9733 100644 --- a/itests/src/test/java/org/apache/unomi/itests/TestUtils.java +++ b/itests/src/test/java/org/apache/unomi/itests/TestUtils.java @@ -17,18 +17,31 @@ package org.apache.unomi.itests; -import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.http.HttpResponse; import org.apache.http.util.EntityUtils; +import org.apache.unomi.persistence.spi.CustomObjectMapper; import java.io.IOException; public class TestUtils { public static T retrieveResourceFromResponse(HttpResponse response, Class clazz) throws IOException { +if (response == null) { +return null; +} +if (response.getEntity() == null) { +return null; +} String jsonFromResponse = EntityUtils.toString(response.getEntity()); -ObjectMapper mapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); -return mapper.readValue(jsonFromResponse, clazz); +// ObjectMapper mapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); +ObjectMapper mapper = CustomObjectMapper.getObjectMapper(); +try { +T value = mapper.readValue(jsonFromResponse, clazz); +
incubator-unomi git commit: UNOMI-213 Move twitter sample HTML out of root context and build a proper HTML welcome page in the root context - Improve layout and styling
Repository: incubator-unomi Updated Branches: refs/heads/master b3b6c5c85 -> b8722499a UNOMI-213 Move twitter sample HTML out of root context and build a proper HTML welcome page in the root context - Improve layout and styling Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/b8722499 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/b8722499 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/b8722499 Branch: refs/heads/master Commit: b8722499a19cf3af1c69e91621c85417242e7f14 Parents: b3b6c5c Author: Serge Huber Authored: Mon Nov 26 14:57:31 2018 +0100 Committer: Serge Huber Committed: Mon Nov 26 14:57:31 2018 +0100 -- .../webapp/images/apache-feather-tm-new.png | Bin 0 -> 1359 bytes .../main/webapp/images/apache-unomi-380x85.png | Bin 0 -> 28161 bytes wab/src/main/webapp/images/unomi-86x20.png | Bin 0 -> 17610 bytes wab/src/main/webapp/index.html | 79 +-- 4 files changed, 57 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b8722499/wab/src/main/webapp/images/apache-feather-tm-new.png -- diff --git a/wab/src/main/webapp/images/apache-feather-tm-new.png b/wab/src/main/webapp/images/apache-feather-tm-new.png new file mode 100644 index 000..3b0c98e Binary files /dev/null and b/wab/src/main/webapp/images/apache-feather-tm-new.png differ http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b8722499/wab/src/main/webapp/images/apache-unomi-380x85.png -- diff --git a/wab/src/main/webapp/images/apache-unomi-380x85.png b/wab/src/main/webapp/images/apache-unomi-380x85.png new file mode 100644 index 000..3da0642 Binary files /dev/null and b/wab/src/main/webapp/images/apache-unomi-380x85.png differ http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b8722499/wab/src/main/webapp/images/unomi-86x20.png -- diff --git a/wab/src/main/webapp/images/unomi-86x20.png b/wab/src/main/webapp/images/unomi-86x20.png new file mode 100644 index 000..09052ee Binary files /dev/null and b/wab/src/main/webapp/images/unomi-86x20.png differ http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b8722499/wab/src/main/webapp/index.html -- diff --git a/wab/src/main/webapp/index.html b/wab/src/main/webapp/index.html index 4c4b2da..9651690 100644 --- a/wab/src/main/webapp/index.html +++ b/wab/src/main/webapp/index.html @@ -14,7 +14,7 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + @@ -25,28 +25,63 @@ Apache Unomi Welcome Page - -Welcome to Apache Unomi -Congratulations, you have successfully installed Apache Unomi ! -Where to go from here - -Checkout some cool http://unomi.apache.org/resources.html; target="_blank">videos & tutorials - -Read http://unomi.apache.org/manual/latest/index.html; target="_blank">Apache Unomi's manual - -Try out some http://unomi.apache.org/manual/latest/index.html#_integration_samples; -target="_blank">samples -Join http://unomi.apache.org/community.html; target="_blank">Apache Unomi's mailing lists -Star the project on Github -https://github.com/apache/incubator-unomi; data-icon="octicon-star" - data-show-count="true" aria-label="Star apache/incubator-unomi on GitHub">Star - -Fork the https://github.com/apache/incubator-unomi; target="_blank">code and submit pull -requests (github repository) - - + + + + + + + + + + + + + + https://www.apache.org;> + + + + + + + + - + + + + + + + Welcome to Apache Unomi ! + Apache Unomi is a Java Open Source customer data platform, a Java server designed to manage customers, leads and visitors data and help personalize customers experiences while also offering features to respect visitor privacy rules (such as GDPR) + + +
incubator-unomi git commit: UNOMI-213 Move twitter sample HTML out of root context and build a proper HTML welcome page in the root context - Add bootstrap to improve layout & l
Repository: incubator-unomi Updated Branches: refs/heads/master c360cbcf2 -> b3b6c5c85 UNOMI-213 Move twitter sample HTML out of root context and build a proper HTML welcome page in the root context - Add bootstrap to improve layout & l Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/b3b6c5c8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/b3b6c5c8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/b3b6c5c8 Branch: refs/heads/master Commit: b3b6c5c85b8b05f0114d2fe79210df2c8a0cf10c Parents: c360cbc Author: Serge Huber Authored: Mon Nov 26 14:35:49 2018 +0100 Committer: Serge Huber Committed: Mon Nov 26 14:35:49 2018 +0100 -- wab/src/main/webapp/index.html | 45 - 1 file changed, 29 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b3b6c5c8/wab/src/main/webapp/index.html -- diff --git a/wab/src/main/webapp/index.html b/wab/src/main/webapp/index.html index b461cc2..4c4b2da 100644 --- a/wab/src/main/webapp/index.html +++ b/wab/src/main/webapp/index.html @@ -17,25 +17,38 @@ - + + + +https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css; + integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"> Apache Unomi Welcome Page - Welcome to Apache Unomi - Congratulations, you have successfully installed Apache Unomi ! - Where to go from here - - Checkout some cool http://unomi.apache.org/resources.html; target="_blank">videos & tutorials - Read http://unomi.apache.org/manual/latest/index.html; target="_blank">Apache Unomi's manual - Try out some http://unomi.apache.org/manual/latest/index.html#_integration_samples; target="_blank">samples - Join http://unomi.apache.org/community.html; target="_blank">Apache Unomi's mailing lists - Star the project on Github - https://github.com/apache/incubator-unomi; data-icon="octicon-star" data-show-count="true" aria-label="Star apache/incubator-unomi on GitHub">Star - - Fork the https://github.com/apache/incubator-unomi; target="_blank">code and submit pull requests (github repository) - + +Welcome to Apache Unomi +Congratulations, you have successfully installed Apache Unomi ! +Where to go from here + +Checkout some cool http://unomi.apache.org/resources.html; target="_blank">videos & tutorials + +Read http://unomi.apache.org/manual/latest/index.html; target="_blank">Apache Unomi's manual + +Try out some http://unomi.apache.org/manual/latest/index.html#_integration_samples; +target="_blank">samples +Join http://unomi.apache.org/community.html; target="_blank">Apache Unomi's mailing lists +Star the project on Github +https://github.com/apache/incubator-unomi; data-icon="octicon-star" + data-show-count="true" aria-label="Star apache/incubator-unomi on GitHub">Star + +Fork the https://github.com/apache/incubator-unomi; target="_blank">code and submit pull +requests (github repository) + + - - https://buttons.github.io/buttons.js"> + + + +https://buttons.github.io/buttons.js"> \ No newline at end of file
[5/5] incubator-unomi git commit: UNOMI-187 Integrate analytics.js - Added form submission tracking to web tracker - Added documentation on how to setup form tracking - Improved SSH commands to be abl
UNOMI-187 Integrate analytics.js - Added form submission tracking to web tracker - Added documentation on how to setup form tracking - Improved SSH commands to be able to pass a maxEntries argument to specify how many entries we want to retrieve (the default was 50 and it was not possible to change it) - Added an form tracking example to the http://localhost:8181/tracker test page. Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/cae989b3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/cae989b3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/cae989b3 Branch: refs/heads/master Commit: cae989b3b12c3ae3f6023b208509a427f0764fc1 Parents: b5c5893 Author: Serge Huber Authored: Fri Nov 23 18:00:03 2018 +0100 Committer: Serge Huber Committed: Fri Nov 23 18:00:03 2018 +0100 -- .../javascript/dist/unomi-tracker.js| 719 +-- .../javascript/dist/unomi-tracker.min.js| 8 +- .../analytics.js-integration-apache-unomi.js| 79 +- extensions/web-tracker/javascript/yarn.lock | 650 +++-- extensions/web-tracker/wab/pom.xml | 7 +- .../cxs/rules/form-mapping-example.json | 52 ++ .../web-tracker/wab/src/main/webapp/index.html | 97 ++- .../src/main/asciidoc/installing-tracker.adoc | 226 +- .../shell/commands/ProfileListCommand.java | 5 + .../unomi/shell/commands/RuleListCommand.java | 25 +- .../shell/commands/SegmentListCommand.java | 6 +- .../shell/commands/SessionListCommand.java | 5 + .../resources/OSGI-INF/blueprint/blueprint.xml | 1 + 13 files changed, 1229 insertions(+), 651 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cae989b3/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 707632e..4885786 100644 --- a/extensions/web-tracker/javascript/dist/unomi-tracker.js +++ b/extensions/web-tracker/javascript/dist/unomi-tracker.js @@ -309,7 +309,7 @@ var clone = function clone(obj) { module.exports = clone; -},{"component-type":53}],4:[function(require,module,exports){ +},{"component-type":56}],4:[function(require,module,exports){ 'use strict'; /* @@ -2059,7 +2059,7 @@ module.exports.store = store; module.exports.metrics = metrics; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./cookie":16,"./group":18,"./memory":20,"./metrics":21,"./normalize":22,"./pageDefaults":23,"./store":24,"./user":25,"@ndhoule/after":1,"@ndhoule/clone":3,"@ndhoule/defaults":4,"@ndhoule/each":6,"@ndhoule/foldl":9,"@ndhoule/keys":11,"@ndhoule/pick":13,"@segment/is-meta":34,"@segment/prevent-default":38,"bind-all":43,"component-emitter":48,"component-event":49,"component-querystring":51,"component-type":53,"debug":26,"extend":58,"is":62,"next-tick":71,"segmentio-facade":81}],16:[function(require,module,exports){ +},{"./cookie":16,"./group":18,"./memory":20,"./metrics":21,"./normalize":22,"./pageDefaults":23,"./store":24,"./user":25,"@ndhoule/after":1,"@ndhoule/clone":3,"@ndhoule/defaults":4,"@ndhoule/each":6,"@ndhoule/foldl":9,"@ndhoule/keys":11,"@ndhoule/pick":13,"@segment/is-meta":34,"@segment/prevent-default":38,"bind-all":43,"component-emitter":51,"component-event":52,"component-querystring":54,"component-type":56,"debug":26,"extend":61,"is":65,"next-tick":74,"segmentio-facade":84}],16:[function(require,module,exports){ 'use strict'; /** @@ -2187,7 +2187,7 @@ module.exports = bindAll(new Cookie()); module.exports.Cookie = Cookie; -},{"@ndhoule/clone":3,"@ndhoule/defaults":4,"@segment/top-domain":41,"bind-all":43,"component-cookie":45,"debug":26,"json3":63}],17:[function(require,module,exports){ +},{"@ndhoule/clone":3,"@ndhoule/defaults":4,"@segment/top-domain":41,"bind-all":43,"component-cookie":45,"debug":26,"json3":66}],17:[function(require,module,exports){ 'use strict'; /* @@ -2481,7 +2481,7 @@ module.exports = bindAll(new Group()); module.exports.Group = Group; -},{"./entity":17,"bind-all":43,"debug":26,"inherits":60}],19:[function(require,module,exports){ +},{"./entity":17,"bind-all":43,"debug":26,"inherits":63}],19:[function(require,module,exports){ 'use strict'; /** @@ -2766,7 +2766,7 @@ function normalize(msg, list) { } } -},{"@ndhoule/defaults":4,"@ndhoule/each":6,"@ndhoule/includes":10,"@ndhoule/map":12,"component-type":53,"debug":26}],23:[function(require,module,exports){
[3/5] incubator-unomi git commit: UNOMI-187 Integrate analytics.js - Added form submission tracking to web tracker - Added documentation on how to setup form tracking - Improved SSH commands to be abl
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cae989b3/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 04c1869..2553dfa 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 @@ -180,14 +180,15 @@ Unomi.prototype.onidentify = function(identify) { * @api private * @param {Track} track */ -// TODO: figure out why we need this. Unomi.prototype.ontrack = function(track) { -console.log('ontrack'); -console.log(track); -// var json = track.json(); - -// delete json.traits; -// this.collectEvent(json); +// we use the track event name to know that we are submitted a form because Analytics.js trackForm method doesn't give +// us another way of knowing that we are processing a form. +if (track.event() && track.event().indexOf("form") === 0) { +var form = document.forms[track.properties().formName]; +var formEvent = this.buildFormEvent(form.name); +formEvent.properties = this.extractFormData(form); +this.collectEvent(formEvent); +} }; /** @@ -316,6 +317,16 @@ Unomi.prototype.buildTargetPage = function () { * * @returns {*|{scope, itemId: *, itemType: *}} */ +Unomi.prototype.buildSourcePage = function () { +return this.buildSource(window.digitalData.page.pageInfo.pageID, 'page', window.digitalData.page); +}; + + +/** + * This function return the source object for a source of type page + * + * @returns {*|{scope, itemId: *, itemType: *}} + */ Unomi.prototype.buildPage = function (page) { return this.buildSource(page.pageInfo.pageID, 'page', page); }; @@ -532,3 +543,57 @@ Unomi.prototype.executeFallback = function () { } } }; + +Unomi.prototype.extractFormData = function (form) { +var params = {}; +for (var i = 0; i < form.elements.length; i++) { +var e = form.elements[i]; +if (typeof(e.name) != 'undefined') { +switch (e.nodeName) { +case 'TEXTAREA': +case 'INPUT': +switch (e.type) { +case 'checkbox': +var checkboxes = document.querySelectorAll('input[name="' + e.name + '"]'); +if (checkboxes.length > 1) { +if (!params[e.name]) { +params[e.name] = []; +} +if (e.checked) { +params[e.name].push(e.value); +} + +} +break; +case 'radio': +if (e.checked) { +params[e.name] = e.value; +} +break; +default: +if (!e.value || e.value == '') { +// ignore element if no value is provided +break; +} +params[e.name] = e.value; +} +break; +case 'SELECT': +if (e.options && e.options[e.selectedIndex]) { +if (e.multiple) { +params[e.name] = []; +for (var j = 0; j < e.options.length; j++) { +if (e.options[j].selected) { +params[e.name].push(e.options[j].value); +} +} +} else { +params[e.name] = e.options[e.selectedIndex].value; +} +} +break; +} +} +} +return params; +};
[4/5] incubator-unomi git commit: UNOMI-187 Integrate analytics.js - Added form submission tracking to web tracker - Added documentation on how to setup form tracking - Improved SSH commands to be abl
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cae989b3/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 75fe41b..03681c6 100644 --- a/extensions/web-tracker/javascript/dist/unomi-tracker.min.js +++ b/extensions/web-tracker/javascript/dist/unomi-tracker.min.js @@ -16,13 +16,13 @@ * * @license Apache-2.0 */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&)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&if(!s&)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&,a=0;ahttp://www.w3.org/1999/xlink","href;)||t.getAttribute("xlink:href");r.track(i,a),s&&"_blank"!==t.target&&!j(o)&&(S(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){S(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=E(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&(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&(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]&[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&(n.ajs_uid,r),n.ajs_event&(n.ajs _event,o),n.ajs_aid&(n.ajs_aid),this},r.prototype.normalize=function(t){return t=O(t,k(this._integrations)),t.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(){return
[2/5] incubator-unomi git commit: UNOMI-187 Integrate analytics.js - Added form submission tracking to web tracker - Added documentation on how to setup form tracking - Improved SSH commands to be abl
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cae989b3/extensions/web-tracker/javascript/yarn.lock -- diff --git a/extensions/web-tracker/javascript/yarn.lock b/extensions/web-tracker/javascript/yarn.lock index 6b8f315..9054ee1 100644 --- a/extensions/web-tracker/javascript/yarn.lock +++ b/extensions/web-tracker/javascript/yarn.lock @@ -5,26 +5,22 @@ "@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" @@ -32,67 +28,56 @@ "@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" @@ -133,7 +118,6 @@ "@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" @@ -159,34 +143,28 @@ "@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-OskLnChnjf1GfnYZH3sdBjZzA08= dependencies: utf8-encode "1" "@segment/canonical@^1.0.0": version "1.0.0" resolved
[1/5] incubator-unomi git commit: UNOMI-187 Integrate analytics.js - Added form submission tracking to web tracker - Added documentation on how to setup form tracking - Improved SSH commands to be abl
Repository: incubator-unomi Updated Branches: refs/heads/master b5c5893e3 -> cae989b3b http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cae989b3/extensions/web-tracker/wab/pom.xml -- diff --git a/extensions/web-tracker/wab/pom.xml b/extensions/web-tracker/wab/pom.xml index dbb462e..5040b51 100755 --- a/extensions/web-tracker/wab/pom.xml +++ b/extensions/web-tracker/wab/pom.xml @@ -74,7 +74,12 @@ -../javascript/dist + +../javascript/dist + + +src/main/resources + http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cae989b3/extensions/web-tracker/wab/src/main/resources/META-INF/cxs/rules/form-mapping-example.json -- diff --git a/extensions/web-tracker/wab/src/main/resources/META-INF/cxs/rules/form-mapping-example.json b/extensions/web-tracker/wab/src/main/resources/META-INF/cxs/rules/form-mapping-example.json new file mode 100644 index 000..b03f91d --- /dev/null +++ b/extensions/web-tracker/wab/src/main/resources/META-INF/cxs/rules/form-mapping-example.json @@ -0,0 +1,52 @@ +{ + "itemId": "form-mapping-example", + "itemType": "rule", + "linkedItems": null, + "raiseEventOnlyOnceForProfile": false, + "raiseEventOnlyOnceForSession": false, + "priority": -1, + "metadata": { +"id": "form-mapping-example", +"name": "Example Form Mapping", +"description": "An example of how to map event properties to profile properties", +"scope": "realEstateManager", +"tags": [], +"enabled": true, +"missingPlugins": false, +"hidden": false, +"readOnly": false + }, + "condition": { +"type": "formEventCondition", +"parameterValues": { + "formId": "testFormTracking", + "pagePath" : "/tracker/" +} + }, + "actions": [ +{ + "type": "setPropertyAction", + "parameterValues": { +"setPropertyName": "properties(firstName)", +"setPropertyValue": "eventProperty::properties(firstName)", +"setPropertyStrategy": "alwaysSet" + } +}, +{ + "type": "setPropertyAction", + "parameterValues": { +"setPropertyName": "properties(lastName)", +"setPropertyValue": "eventProperty::properties(lastName)", +"setPropertyStrategy": "alwaysSet" + } +}, +{ + "type": "setPropertyAction", + "parameterValues": { +"setPropertyName": "properties(email)", +"setPropertyValue": "eventProperty::properties(email)", +"setPropertyStrategy": "alwaysSet" + } +} + ] +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cae989b3/extensions/web-tracker/wab/src/main/webapp/index.html -- diff --git a/extensions/web-tracker/wab/src/main/webapp/index.html b/extensions/web-tracker/wab/src/main/webapp/index.html index aa344a1..85437c7 100644 --- a/extensions/web-tracker/wab/src/main/webapp/index.html +++ b/extensions/web-tracker/wab/src/main/webapp/index.html @@ -20,17 +20,61 @@ http://www.w3.org/1999/xhtml; xml:lang="en" lang="en"> -Test +Apache Unomi Web Tracker Test Page + +form { +display: grid; +grid-template-columns: 200px 1fr; +grid-gap: 16px; +} + +label { +grid-column: 1 / 2; +} + +input, +button { +grid-column: 2 / 3; +} + + var unomiOption = { scope: 'realEstateManager', url: 'http://localhost:8181' }; -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
incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Update dependency versions to make the GraphQL framework work again
Repository: incubator-unomi Updated Branches: refs/heads/UNOMI-180-CXS-GRAPHQLAPI d1053a86c -> 8269262a5 UNOMI-180 Implement CXS GraphQL API - Update dependency versions to make the GraphQL framework work again Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/8269262a Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/8269262a Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/8269262a Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: 8269262a5bb81a2d1fb48b35186d1d233459357f Parents: d1053a8 Author: Serge Huber Authored: Thu Nov 22 13:33:51 2018 +0100 Committer: Serge Huber Committed: Thu Nov 22 13:33:51 2018 +0100 -- graphql/cxs-impl/pom.xml | 2 +- graphql/karaf-feature/pom.xml | 16 ++-- graphql/pom.xml | 5 +++-- 3 files changed, 14 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/8269262a/graphql/cxs-impl/pom.xml -- diff --git a/graphql/cxs-impl/pom.xml b/graphql/cxs-impl/pom.xml index 7f41d79..8a0e883 100644 --- a/graphql/cxs-impl/pom.xml +++ b/graphql/cxs-impl/pom.xml @@ -32,7 +32,7 @@ -com.graphql-java +com.graphql-java-kickstart graphql-java-servlet ${graphql.java.servlet.version} provided http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/8269262a/graphql/karaf-feature/pom.xml -- diff --git a/graphql/karaf-feature/pom.xml b/graphql/karaf-feature/pom.xml index 61aa3a1..c051b18 100644 --- a/graphql/karaf-feature/pom.xml +++ b/graphql/karaf-feature/pom.xml @@ -35,22 +35,26 @@ com.fasterxml.jackson.core jackson-core -2.8.6 +${jackson.version} +compile com.fasterxml.jackson.core jackson-annotations -2.8.6 +${jackson.version} +compile com.fasterxml.jackson.core jackson-databind -2.8.6 +${jackson.version} +compile com.fasterxml.jackson.datatype jackson-datatype-jdk8 -2.8.4 +${jackson.version} +compile com.google.guava @@ -70,7 +74,7 @@ com.graphql-java java-dataloader -2.0.2 +2.2.0 org.reactivestreams @@ -80,7 +84,7 @@ -com.graphql-java +com.graphql-java-kickstart graphql-java-servlet ${graphql.java.servlet.version} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/8269262a/graphql/pom.xml -- diff --git a/graphql/pom.xml b/graphql/pom.xml index 9ab861d..d879d27 100644 --- a/graphql/pom.xml +++ b/graphql/pom.xml @@ -31,9 +31,10 @@ pom -5.0.1 -8.0 +7.1.0 +11.0 6.1 +2.9.7
incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Update version numbers
Repository: incubator-unomi Updated Branches: refs/heads/UNOMI-180-CXS-GRAPHQLAPI b0bb8d00a -> d1053a86c UNOMI-180 Implement CXS GraphQL API - Update version numbers Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/d1053a86 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/d1053a86 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/d1053a86 Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: d1053a86c5155be15ee6a979c74b80c7fa13c1fa Parents: b0bb8d0 Author: Serge Huber Authored: Wed Nov 21 20:21:37 2018 +0100 Committer: Serge Huber Committed: Wed Nov 21 20:21:37 2018 +0100 -- graphql/cxs-impl/pom.xml | 4 ++-- graphql/karaf-feature/pom.xml | 8 graphql/pom.xml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d1053a86/graphql/cxs-impl/pom.xml -- diff --git a/graphql/cxs-impl/pom.xml b/graphql/cxs-impl/pom.xml index af951ca..7f41d79 100644 --- a/graphql/cxs-impl/pom.xml +++ b/graphql/cxs-impl/pom.xml @@ -21,7 +21,7 @@ org.apache.unomi unomi-graphql -1.3.0-incubating-SNAPSHOT +1.4.0-incubating-SNAPSHOT 4.0.0 @@ -76,7 +76,7 @@ org.apache.unomi unomi-api -1.3.0-incubating-SNAPSHOT +1.4.0-incubating-SNAPSHOT provided http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d1053a86/graphql/karaf-feature/pom.xml -- diff --git a/graphql/karaf-feature/pom.xml b/graphql/karaf-feature/pom.xml index 3179638..61aa3a1 100644 --- a/graphql/karaf-feature/pom.xml +++ b/graphql/karaf-feature/pom.xml @@ -21,12 +21,12 @@ org.apache.unomi unomi-graphql -1.3.0-incubating-SNAPSHOT +1.4.0-incubating-SNAPSHOT 4.0.0 feature -cxs-graphql-feature +cdp-graphql-feature Apache Unomi :: GraphQL API :: Karaf Feature Apache Unomi Context GraphQL API Karaf Feature @@ -113,8 +113,8 @@ org.apache.unomi -cxs-graphql-api-impl -1.3.0-incubating-SNAPSHOT +cdp-graphql-api-impl +1.4.0-incubating-SNAPSHOT http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d1053a86/graphql/pom.xml -- diff --git a/graphql/pom.xml b/graphql/pom.xml index 25d0e3f..9ab861d 100644 --- a/graphql/pom.xml +++ b/graphql/pom.xml @@ -22,7 +22,7 @@ org.apache.unomi unomi-root -1.3.0-incubating-SNAPSHOT +1.4.0-incubating-SNAPSHOT unomi-graphql
[18/50] [abbrv] incubator-unomi git commit: UNOMI-208 Improve documentation flow & document tracker integration
UNOMI-208 Improve documentation flow & document tracker integration Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/cfe3158e Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/cfe3158e Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/cfe3158e Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: cfe3158e7bb0fecd38e980e7d99e401f3c345ec8 Parents: 5e4cd37 Author: Serge Huber Authored: Fri Nov 2 16:44:10 2018 +0100 Committer: Serge Huber Committed: Fri Nov 2 16:44:10 2018 +0100 -- manual/src/main/asciidoc/5-min-quickstart.adoc | 38 +++ .../main/asciidoc/building-and-deploying.adoc | 40 +--- manual/src/main/asciidoc/configuration.adoc | 4 - manual/src/main/asciidoc/custom-extensions.adoc | 89 manual/src/main/asciidoc/getting-started.adoc | 7 +- manual/src/main/asciidoc/index.adoc | 30 +++--- .../src/main/asciidoc/installing-tracker.adoc | 44 manual/src/main/asciidoc/patches.adoc | 102 +++ .../src/main/asciidoc/samples/login-sample.adoc | 10 -- 9 files changed, 208 insertions(+), 156 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cfe3158e/manual/src/main/asciidoc/5-min-quickstart.adoc -- diff --git a/manual/src/main/asciidoc/5-min-quickstart.adoc b/manual/src/main/asciidoc/5-min-quickstart.adoc new file mode 100644 index 000..5bb2e20 --- /dev/null +++ b/manual/src/main/asciidoc/5-min-quickstart.adoc @@ -0,0 +1,38 @@ +// +// 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 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. +// + Five Minutes QuickStart + +1) Install JDK 8 (http://www.oracle.com/technetwork/java/javase/downloads/index.html) and make sure you set the +JAVA_HOME variable https://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/ + +2) Download ElasticSearch here : https://www.elastic.co/downloads/past-releases/elasticsearch-5-6-3 (please make sure you use the proper version : 5.6.3) + +3) Uncompress it and change the `config/elasticsearch.yml` to include the following config : cluster.name: contextElasticSearch + +4) Launch ElasticSearch using : `bin/elasticsearch` + +5) Download Apache Unomi here : http://unomi.incubator.apache.org/download.html + +6) Start it using : `./bin/karaf` + +7) Start the Apache Unomi packages using `unomi:start` in the Apache Karaf Shell + +8) Wait for startup to complete + +9) Try accessing https://localhost:9443/cxs/cluster with username/password: `karaf/karaf` . You might get a certificate warning in your browser, just accept it despite the warning it is safe. + +10) Request your first context by simply accessing : http://localhost:8181/context.js?sessionId=1234 + +11) If something goes wrong, you should check the logs in `./data/log/karaf.log`. If you get errors on ElasticSearch, +make sure you are using the proper version. http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cfe3158e/manual/src/main/asciidoc/building-and-deploying.adoc -- diff --git a/manual/src/main/asciidoc/building-and-deploying.adoc b/manual/src/main/asciidoc/building-and-deploying.adoc index b285779..e7e5a11 100644 --- a/manual/src/main/asciidoc/building-and-deploying.adoc +++ b/manual/src/main/asciidoc/building-and-deploying.adoc @@ -29,8 +29,9 @@ Building -1) Change to the top level directory of Apache Unomi source distribution. -2) Run +1) Get the code: `git clone https://git-wip-us.apache.org/repos/asf/incubator-unomi.git` +2) Change to the top level directory of Apache Unomi source distribution. +3) Run [source] @@ -48,27 +49,21 @@ This will compile Apache Unomi and run all of the tests in the This will compile Apache Unomi without running the tests and takes less time to build. -3) The distributions will be available under "package/target" directory. +4) The distributions will be available under "package/target" directory. Installing an ElasticSearch server Starting with version 1.2, Apache Unomi no longer embeds an ElasticSearch server as this is no longer supported by the developers of ElasticSearch.
[28/50] [abbrv] incubator-unomi git commit: v1.0.5
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6833975e/extensions/web-tracker/javascript/package.json -- diff --git a/extensions/web-tracker/javascript/package.json b/extensions/web-tracker/javascript/package.json index 10bcf38..39698b9 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.4", + "version": "1.0.5", "description": "The Apache Unomi analytics.js integration.", "main": "dist/unomi-tracker.js", "keywords": [ @@ -15,7 +15,7 @@ "browserify": "browserify src/index.js -p [ browserify-header --file src/license.js ] -s unomiTracker -o dist/unomi-tracker.js", "replace": "replace-in-file 'analytics.require = require' '//analytics.require = require' dist/unomi-tracker.js", "minify": "uglifyjs -c -m --comments '/@license/' -o dist/unomi-tracker.min.js -- dist/unomi-tracker.js", -"snippet:minify": "uglifyjs -c -m -o snippet.min.js -- snippet.js", +"snippet:minify": "uglifyjs -c -m -o snippet.min.js --source-map snippet.min.js.map -- snippet.js", "clean": "rimraf *.log dist/unomi-tracker.js dist/unomi-tracker.min.js", "clean:all": "yarn clean && rimraf node_modules" }, http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6833975e/extensions/web-tracker/javascript/snippet.min.js.map -- diff --git a/extensions/web-tracker/javascript/snippet.min.js.map b/extensions/web-tracker/javascript/snippet.min.js.map new file mode 100644 index 000..4f72bdd --- /dev/null +++ b/extensions/web-tracker/javascript/snippet.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["snippet.js"],"names":["window","unomiTracker","callback","e","initialize","Apache Unomi","unomiOption","unomiTracker_queue","length","item","shift","method","apply","methods","i","args","Array","prototype","slice","call","arguments","unshift","push","load","script","document","createElement","type","async","src","url","addEventListener","onreadystatechange","this","readyState","event","first","getElementsByTagName","parentNode","insertBefore","page"],"mappings":"AAgBAA,OAAOC,eAAiBD,OAAOC,iBAC/B,WAoBI,QAASC,GAASC,GAOd,IANAF,aAAaG,YACTC,eAAgBC,cAKbC,EAAmBC,OAAS,GAAG,CAClC,GAAIC,GAAOF,EAAmBG,QAC1BC,EAASF,EAAKC,OACdT,cAAaU,IACbV,aAAaU,GAAQC,MAAMX,aAAcQ,IAhBrD,IAAK,GAdDF,MAEAM,GAAW,cAAe,aAAc,YAAa,YAAa,aAAc,WAAY,WAAY,QAAS,QAAS,QAAS,QAAS,QAAS,QAAS,OAAQ,OAAQ,MAAO,KAAM,eAYtLC,EAAI,EAAGA,EAAID,EAAQL,OAAQM,IAAK,CACrC,GAAIH,GAASE,EAAQC,EACrBd,QAAOC,aAAaU,GAZV,SAAUA,GACpB,MAAO,YACH,GAAII,GAAOC,MAAMC,UAAUC,MAAMC,KAAKC,UAGtC,OAFAL,GAAKM,QAAQV,GACbJ,EAAmBe,KAAKP,GACjBf,OAAO C,eAOoBU,GAqB1CV,aAAasB,KAAO,WAEhB,GAAIC,GAASC,SAASC,cAAc,SACpCF,GAAOG,KAAO,kBACdH,EAAOI,OAAQ,EAEfJ,EAAOK,IAAMvB,YAAYwB,IAAM,gCAE3BN,EAAOO,iBACPP,EAAOO,iBAAiB,OAAQ,SAAU5B,GACd,kBAAbD,IACPA,EAASC,KAEd,GAEHqB,EAAOQ,mBAAqB,WACA,aAApBC,KAAKC,YAAiD,WAApBD,KAAKC,YACvChC,EAASF,OAAOmC,OAM5B,IAAIC,GAAQX,SAASY,qBAAqB,UAAU,EACpDD,GAAME,WAAWC,aAAaf,EAAQY,IAG1CX,SAASM,iBAAiB,mBAAoB9B,aAAasB,MAE3DtB,aAAauC","file":"snippet.min.js"} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6833975e/manual/src/archives/1.3/asciidoc/5-min-quickstart.adoc -- diff --git a/manual/src/archives/1.3/asciidoc/5-min-quickstart.adoc b/manual/src/archives/1.3/asciidoc/5-min-quickstart.adoc new file mode 100644 index 000..5bb2e20 --- /dev/null +++ b/manual/src/archives/1.3/asciidoc/5-min-quickstart.adoc @@ -0,0 +1,38 @@ +// +// 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 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. +// + Five Minutes QuickStart + +1) Install JDK 8 (http://www.oracle.com/technetwork/java/javase/downloads/index.html) and make sure you set the +JAVA_HOME variable https://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/ + +2) Download ElasticSearch here : https://www.elastic.co/downloads/past-releases/elasticsearch-5-6-3 (please make sure you use the proper version : 5.6.3) + +3) Uncompress it and change the `config/elasticsearch.yml` to include the following config : cluster.name: contextElasticSearch + +4) Launch ElasticSearch using : `bin/elasticsearch` + +5) Download Apache Unomi here : http://unomi.incubator.apache.org/download.html + +6) Start it using : `./bin/karaf` + +7) Start
[35/50] [abbrv] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Rename CXS to CDP
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b0bb8d00/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventType.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventType.java new file mode 100644 index 000..e59895b --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventType.java @@ -0,0 +1,63 @@ +/* + * 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.graphql.types.output; + +import graphql.annotations.annotationTypes.GraphQLField; +import graphql.annotations.annotationTypes.GraphQLName; +import org.apache.unomi.graphql.propertytypes.CDPPropertyType; + +import java.util.ArrayList; +import java.util.List; + +@GraphQLName("CDP_EventType") +public class CDPEventType { + +private String id; +private String scope; +private String typeName; +private List properties = new ArrayList<>(); + +public CDPEventType(@GraphQLName("id") String id, +@GraphQLName("scope") String scope, +@GraphQLName("typeName") String typeName, +@GraphQLName("properties") List properties) { +this.id = id; +this.scope = scope; +this.typeName = typeName; +this.properties = properties; +} + +@GraphQLField +public String getId() { +return id; +} + +@GraphQLField +public String getScope() { +return scope; +} + +@GraphQLField +public String getTypeName() { +return typeName; +} + +@GraphQLField +public List getProperties() { +return properties; +} +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b0bb8d00/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoDistanceUnit.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoDistanceUnit.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoDistanceUnit.java new file mode 100644 index 000..f046e62 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoDistanceUnit.java @@ -0,0 +1,26 @@ +/* + * 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.graphql.types.output; + +import graphql.annotations.annotationTypes.GraphQLName; + +@GraphQLName("CDP_GeoDistanceUnit") +public enum CDPGeoDistanceUnit { +METERS, +KILOMETERS, +MILES +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b0bb8d00/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoPoint.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoPoint.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoPoint.java new file mode 100644 index 000..58cc2b8 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoPoint.java @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file
[05/50] [abbrv] 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
[13/50] [abbrv] 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
[43/50] [abbrv] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Modify the type generation to use "Input" suffix for input types instead of a prefix.
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoPointInput.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoPointInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoPointInput.java new file mode 100644 index 000..772abb8 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoPointInput.java @@ -0,0 +1,28 @@ +/* + * 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.graphql.types.input; + +import graphql.annotations.annotationTypes.GraphQLField; +import graphql.annotations.annotationTypes.GraphQLName; + +@GraphQLName("CXS_GeoPoint") +public class CXSGeoPointInput { +@GraphQLField +public Double longitude; +@GraphQLField +public Double latitude; +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSOrderByInput.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSOrderByInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSOrderByInput.java new file mode 100644 index 000..3ee5e1c --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSOrderByInput.java @@ -0,0 +1,31 @@ +/* + * 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.graphql.types.input; + +import graphql.annotations.annotationTypes.GraphQLField; +import graphql.annotations.annotationTypes.GraphQLName; +import org.apache.unomi.graphql.types.output.CXSSortOrder; + +@GraphQLName("CXS_OrderBy") +public class CXSOrderByInput { + +@GraphQLField +public String fieldName; + +@GraphQLField +public CXSSortOrder sortOrder; +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/e2f4e0df/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSPropertyTypeInput.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSPropertyTypeInput.java new file mode 100644 index 000..9917ca3 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSPropertyTypeInput.java @@ -0,0 +1,76 @@ +/* + * 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. + */
[44/50] [abbrv] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Modify the type generation to use "Input" suffix for input types instead of a prefix.
UNOMI-180 Implement CXS GraphQL API - Modify the type generation to use "Input" suffix for input types instead of a prefix. Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/e2f4e0df Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/e2f4e0df Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/e2f4e0df Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: e2f4e0dfa617aa4b59c1c875dab82804c78097bf Parents: 146e755 Author: Serge Huber Authored: Sun Nov 18 23:50:09 2018 +0100 Committer: Serge Huber Committed: Wed Nov 21 14:56:46 2018 +0100 -- graphql/cxs-impl/pom.xml| 6 ++ .../unomi/graphql/CXSDateFilterInput.java | 32 - .../java/org/apache/unomi/graphql/CXSEvent.java | 67 - .../unomi/graphql/CXSEventConnection.java | 32 - .../org/apache/unomi/graphql/CXSEventEdge.java | 30 .../apache/unomi/graphql/CXSEventFilter.java| 32 - .../unomi/graphql/CXSEventFilterInput.java | 35 - .../org/apache/unomi/graphql/CXSEventInput.java | 69 -- .../unomi/graphql/CXSEventOccurrenceFilter.java | 36 -- .../graphql/CXSEventOccurrenceFilterInput.java | 35 - .../unomi/graphql/CXSEventProperties.java | 35 - .../unomi/graphql/CXSEventPropertiesFilter.java | 23 -- .../org/apache/unomi/graphql/CXSEventType.java | 63 .../apache/unomi/graphql/CXSEventTypeInput.java | 62 .../unomi/graphql/CXSGeoDistanceInput.java | 30 .../unomi/graphql/CXSGeoDistanceUnit.java | 26 --- .../org/apache/unomi/graphql/CXSGeoPoint.java | 31 .../apache/unomi/graphql/CXSGeoPointInput.java | 28 .../unomi/graphql/CXSGraphQLProvider.java | 4 +- .../org/apache/unomi/graphql/CXSMutation.java | 22 +++--- .../apache/unomi/graphql/CXSOrderByInput.java | 30 .../unomi/graphql/CXSPropertyTypeInput.java | 76 .../unomi/graphql/CXSProviderManager.java | 4 ++ .../java/org/apache/unomi/graphql/CXSQuery.java | 45 +++- .../org/apache/unomi/graphql/CXSSegment.java| 32 - .../unomi/graphql/CXSSegmentCondition.java | 32 - .../unomi/graphql/CXSSetPropertyTypeInput.java | 46 .../org/apache/unomi/graphql/CXSSortOrder.java | 26 --- .../java/org/apache/unomi/graphql/CXSView.java | 26 --- .../java/org/apache/unomi/graphql/PageInfo.java | 28 .../graphql/builders/CXSEventBuilders.java | 9 ++- .../internal/CXSGraphQLProviderImpl.java| 18 - .../internal/CXSProviderManagerImpl.java| 23 ++ .../propertytypes/CXSFloatPropertyType.java | 18 ++--- .../graphql/types/input/CXSDateFilter.java | 32 + .../graphql/types/input/CXSEventFilter.java | 35 + .../graphql/types/input/CXSEventInput.java | 69 ++ .../input/CXSEventOccurrenceFilterInput.java| 35 + .../graphql/types/input/CXSEventTypeInput.java | 62 .../types/input/CXSGeoDistanceInput.java| 32 + .../graphql/types/input/CXSGeoPointInput.java | 28 .../graphql/types/input/CXSOrderByInput.java| 31 .../types/input/CXSPropertyTypeInput.java | 76 .../types/input/CXSSegmentFilterInput.java | 51 + .../types/input/CXSSetPropertyTypeInput.java| 45 .../unomi/graphql/types/output/CXSEvent.java| 67 + .../types/output/CXSEventConnection.java| 32 + .../graphql/types/output/CXSEventEdge.java | 30 .../graphql/types/output/CXSEventFilter.java| 32 + .../types/output/CXSEventOccurrenceFilter.java | 36 ++ .../types/output/CXSEventProperties.java| 35 + .../types/output/CXSEventPropertiesFilter.java | 23 ++ .../graphql/types/output/CXSEventType.java | 63 .../types/output/CXSGeoDistanceUnit.java| 26 +++ .../unomi/graphql/types/output/CXSGeoPoint.java | 31 .../unomi/graphql/types/output/CXSSegment.java | 32 + .../types/output/CXSSegmentCondition.java | 33 + .../types/output/CXSSegmentConnection.java | 31 .../graphql/types/output/CXSSegmentEdge.java| 31 .../graphql/types/output/CXSSortOrder.java | 26 +++ .../unomi/graphql/types/output/CXSView.java | 26 +++ .../unomi/graphql/types/output/PageInfo.java| 28 graphql/karaf-feature/pom.xml | 19 +++-- graphql/pom.xml | 6 +- 64 files changed, 1219 insertions(+), 995 deletions(-)
[29/50] [abbrv] incubator-unomi git commit: v1.0.5
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6833975e/extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map -- diff --git a/extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map b/extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map new file mode 100644 index 000..3d0b6ac --- /dev/null +++ b/extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["dist/unomi-tracker.js"],"names":["f","exports","module","define","amd","g","window","global","self","this","unomiTracker","r","e","n","t","o","i","c","require","u","a","Error","code","p","call","length","1","arity","objToString","Object","prototype","toString","isFunction","val","isNumber","type","after","fn","TypeError","callCount","apply","arguments","@ndhoule/arity","2","createParams","args","push","createArityWrapper","paramNames","join","wrapperBody","concat","Function","arityWrapperCache","arg1","arg2","arg3","arg4","arg5","func","Math","max","3","clone","obj","copy","key","hasOwnProperty","Array","l","flags","multiline","ignoreCase","RegExp","source","Date","getTime","component-type","4","drop","rest","has","isObject","value","Boolean","isPlainObject","shallowCombiner","target","undefined","deepCombiner","defaultsDeep","defaultsWith","combiner","sources","defaults","deep","@ndhoule/drop","@ndhoule/rest","5","count","collection","toDrop","Number","resu ltsLength","results","6","keys","isArray","isArrayLike","arrayEach","iterator","array","baseEach","object","ks","each","@ndhoule/keys","7","every","predicate","result","@ndhoule/each","8","extend","dest","slice","9","foldl","accumulator","10","strIndexOf","String","indexOf","sameValueZero","value1","value2","includes","searchElement","found","11","hop","strCharAt","charAt","toStr","str","index","context","prop","isString","indexKeys","pred","len","objectKeys","12","map","13","existy","pick","props","14","15","Analytics","_options","Integrations","_integrations","_readied","_timeout","_user","user","log","debug","bindAll","on","settings","options","initialPageview","page","_parseQuery","location","search","_analytics","analytics","Alias","Emitter","Group","Identify","Page","Track","cookie","metrics","group","is","isMeta","memory","nextTick","normalize","bind","pageDefaults","prevent","querystring","store","use","plugin","addIntegration","Integration","name","init","initialize","opts" ,"integrations","All","clonedOpts","integration","add","load","integrationCount","ready","emit","failedInitializations","once","increment","method","integration_name","integrationName","initialized","setAnonymousId","id","anonymousId","identify","traits","msg","userId","_invoke","_callback","groupId","track","event","properties","plan","events","planIntegrationOptions","enabled","Segment.io","__default","_mergeInitializeAndPlanIntegrations","trackClick","trackLink","links","el","ev","href","getAttribute","getAttributeNS","trackSubmit","trackForm","forms","handler","submit","$","jQuery","Zepto","category","defs","overrides","empty","pageview","url","path","alias","to","from","previousId","timeout","enable","disable","localStorage","setTimeout","facade","invoke","shift","reset","logout","query","pickPrefix","prefix","sub","acc","substr","q","parse","ajs_uid","ajs_event","ajs_aid","planIntegrations","noConflict","./cookie","./group","./memory","./metrics","./normalize","./pageDefaults" ,"./store","./user","@ndhoule/after","@ndhoule/clone","@ndhoule/defaults","@ndhoule/foldl","@ndhoule/pick","@segment/is-meta","@segment/prevent-default","bind-all","component-emitter","component-event","component-querystring","next-tick","segmentio-facade","16","Cookie","json","topDomain","domain","maxage","set","get","remove","stringify","@segment/top-domain","component-cookie","json3","17","Entity","isodateTraverse","_storage","storage","_getId","_setId","ret","persist","_id","_getTraits","_setTraits","_traits","current","save","@ndhoule/extend","@segment/isodate-traverse","18","inherit","./entity","inherits","19","VERSION","version","../package.json","./analytics","20","Memory","21","Metrics","send","host","sampleRate","flushTimer","maxQueueSize","queue","setInterval","_flush","metric","tags","random","payload","series","headers","Content-Type","err","res","@segment/send-json","22","list","toLowerCase","lower","s","providers","toplevel","@ndhoule/includes","@ndhoule/map","23","ca
[32/50] [abbrv] incubator-unomi git commit: UNOMI-187 Integrate analytics.js - Remove invalid sourcemap
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b5c5893e/extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map -- diff --git a/extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map b/extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map deleted file mode 100644 index 3d0b6ac..000 --- a/extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["dist/unomi-tracker.js"],"names":["f","exports","module","define","amd","g","window","global","self","this","unomiTracker","r","e","n","t","o","i","c","require","u","a","Error","code","p","call","length","1","arity","objToString","Object","prototype","toString","isFunction","val","isNumber","type","after","fn","TypeError","callCount","apply","arguments","@ndhoule/arity","2","createParams","args","push","createArityWrapper","paramNames","join","wrapperBody","concat","Function","arityWrapperCache","arg1","arg2","arg3","arg4","arg5","func","Math","max","3","clone","obj","copy","key","hasOwnProperty","Array","l","flags","multiline","ignoreCase","RegExp","source","Date","getTime","component-type","4","drop","rest","has","isObject","value","Boolean","isPlainObject","shallowCombiner","target","undefined","deepCombiner","defaultsDeep","defaultsWith","combiner","sources","defaults","deep","@ndhoule/drop","@ndhoule/rest","5","count","collection","toDrop","Number","resu ltsLength","results","6","keys","isArray","isArrayLike","arrayEach","iterator","array","baseEach","object","ks","each","@ndhoule/keys","7","every","predicate","result","@ndhoule/each","8","extend","dest","slice","9","foldl","accumulator","10","strIndexOf","String","indexOf","sameValueZero","value1","value2","includes","searchElement","found","11","hop","strCharAt","charAt","toStr","str","index","context","prop","isString","indexKeys","pred","len","objectKeys","12","map","13","existy","pick","props","14","15","Analytics","_options","Integrations","_integrations","_readied","_timeout","_user","user","log","debug","bindAll","on","settings","options","initialPageview","page","_parseQuery","location","search","_analytics","analytics","Alias","Emitter","Group","Identify","Page","Track","cookie","metrics","group","is","isMeta","memory","nextTick","normalize","bind","pageDefaults","prevent","querystring","store","use","plugin","addIntegration","Integration","name","init","initialize","opts" ,"integrations","All","clonedOpts","integration","add","load","integrationCount","ready","emit","failedInitializations","once","increment","method","integration_name","integrationName","initialized","setAnonymousId","id","anonymousId","identify","traits","msg","userId","_invoke","_callback","groupId","track","event","properties","plan","events","planIntegrationOptions","enabled","Segment.io","__default","_mergeInitializeAndPlanIntegrations","trackClick","trackLink","links","el","ev","href","getAttribute","getAttributeNS","trackSubmit","trackForm","forms","handler","submit","$","jQuery","Zepto","category","defs","overrides","empty","pageview","url","path","alias","to","from","previousId","timeout","enable","disable","localStorage","setTimeout","facade","invoke","shift","reset","logout","query","pickPrefix","prefix","sub","acc","substr","q","parse","ajs_uid","ajs_event","ajs_aid","planIntegrations","noConflict","./cookie","./group","./memory","./metrics","./normalize","./pageDefaults" ,"./store","./user","@ndhoule/after","@ndhoule/clone","@ndhoule/defaults","@ndhoule/foldl","@ndhoule/pick","@segment/is-meta","@segment/prevent-default","bind-all","component-emitter","component-event","component-querystring","next-tick","segmentio-facade","16","Cookie","json","topDomain","domain","maxage","set","get","remove","stringify","@segment/top-domain","component-cookie","json3","17","Entity","isodateTraverse","_storage","storage","_getId","_setId","ret","persist","_id","_getTraits","_setTraits","_traits","current","save","@ndhoule/extend","@segment/isodate-traverse","18","inherit","./entity","inherits","19","VERSION","version","../package.json","./analytics","20","Memory","21","Metrics","send","host","sampleRate","flushTimer","maxQueueSize","queue","setInterval","_flush","metric","tags","random","payload","series","headers","Content-Type","err","res","@segment/send-json","22","list","toLowerCase","lower","s","providers","toplevel","@ndhoule/includes","@ndhoule/map","23","ca
[47/50] [abbrv] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API Make sure we use CXS_ prefix everywhere.
UNOMI-180 Implement CXS GraphQL API Make sure we use CXS_ prefix everywhere. Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/c447befb Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/c447befb Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/c447befb Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: c447befbc291cfb83e745f498606f626d92b437c Parents: f4e2503 Author: Serge Huber Authored: Fri Jul 27 18:08:27 2018 +0200 Committer: Serge Huber Committed: Wed Nov 21 14:56:46 2018 +0100 -- .../unomi/graphql/CXSDateFilterInput.java | 2 ++ .../java/org/apache/unomi/graphql/CXSEvent.java | 2 ++ .../unomi/graphql/CXSEventConnection.java | 2 ++ .../org/apache/unomi/graphql/CXSEventEdge.java | 2 ++ .../apache/unomi/graphql/CXSEventFilter.java| 2 ++ .../unomi/graphql/CXSEventFilterInput.java | 1 + .../org/apache/unomi/graphql/CXSEventInput.java | 2 ++ .../unomi/graphql/CXSEventOccurrenceFilter.java | 2 ++ .../graphql/CXSEventOccurrenceFilterInput.java | 2 ++ .../unomi/graphql/CXSEventProperties.java | 2 ++ .../unomi/graphql/CXSEventPropertiesFilter.java | 3 +++ .../apache/unomi/graphql/CXSEventTypeInput.java | 1 + .../unomi/graphql/CXSGeoDistanceInput.java | 2 ++ .../unomi/graphql/CXSGeoDistanceUnit.java | 3 +++ .../org/apache/unomi/graphql/CXSGeoPoint.java | 2 ++ .../apache/unomi/graphql/CXSGeoPointInput.java | 2 ++ .../apache/unomi/graphql/CXSOrderByInput.java | 2 ++ .../graphql/CXSProfilePropertiesFilter.java | 1 + .../org/apache/unomi/graphql/CXSProperties.java | 28 .../unomi/graphql/CXSPropertyTypeInput.java | 2 +- .../unomi/graphql/CXSSetPropertyTypeInput.java | 1 + .../org/apache/unomi/graphql/CXSSortOrder.java | 3 +++ .../java/org/apache/unomi/graphql/CXSView.java | 2 ++ .../graphql/builders/CXSEventBuilders.java | 22 +++ .../internal/CXSGraphQLProviderImpl.java| 20 +++--- .../propertytypes/CXSBooleanPropertyType.java | 2 +- .../propertytypes/CXSDatePropertyType.java | 1 + .../propertytypes/CXSFloatPropertyType.java | 1 + .../propertytypes/CXSGeoPointPropertyType.java | 1 + .../CXSIdentifierPropertyType.java | 1 + .../propertytypes/CXSIntPropertyType.java | 1 + .../graphql/propertytypes/CXSPropertyType.java | 1 + .../propertytypes/CXSSetPropertyType.java | 1 + .../propertytypes/CXSStringPropertyType.java| 1 + 34 files changed, 71 insertions(+), 52 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c447befb/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDateFilterInput.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDateFilterInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDateFilterInput.java index f92759e..c9e1d07 100644 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDateFilterInput.java +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDateFilterInput.java @@ -17,7 +17,9 @@ package org.apache.unomi.graphql; import graphql.annotations.annotationTypes.GraphQLField; +import graphql.annotations.annotationTypes.GraphQLName; +@GraphQLName("CXS_DateFilterInput") public class CXSDateFilterInput { @GraphQLField public long after; http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c447befb/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java index 123dd87..6e71c28 100644 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java @@ -17,7 +17,9 @@ package org.apache.unomi.graphql; import graphql.annotations.annotationTypes.GraphQLField; +import graphql.annotations.annotationTypes.GraphQLName; +@GraphQLName("CXS_Event") public class CXSEvent { private String id; http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/c447befb/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventConnection.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventConnection.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventConnection.java index 04c208c..7974543 100644 ---
[46/50] [abbrv] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API Big refactoring, will now use a mixture of annotations and manually declared fields to build dynamic fields in schema. B
UNOMI-180 Implement CXS GraphQL API Big refactoring, will now use a mixture of annotations and manually declared fields to build dynamic fields in schema. Because of these changes all the previous functionality is a bit broken for the moment but should be restored in a future commmit. Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/ccfa64fe Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/ccfa64fe Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/ccfa64fe Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: ccfa64feca14ffdd18e8a5039c25d56a2711b61e Parents: fce8f64 Author: Serge Huber Authored: Fri Jul 13 15:22:34 2018 +0200 Committer: Serge Huber Committed: Wed Nov 21 14:56:46 2018 +0100 -- graphql/cxs-impl/pom.xml| 2 + .../java/org/apache/unomi/graphql/CXSEvent.java | 14 +- .../unomi/graphql/CXSEventConnection.java | 30 ++ .../org/apache/unomi/graphql/CXSEventEdge.java | 28 ++ .../apache/unomi/graphql/CXSEventFilter.java| 30 ++ .../unomi/graphql/CXSEventFilterInput.java | 34 ++ .../org/apache/unomi/graphql/CXSEventInput.java | 67 +++ .../unomi/graphql/CXSEventOccurrenceFilter.java | 34 ++ .../unomi/graphql/CXSEventProperties.java | 33 ++ .../unomi/graphql/CXSEventPropertiesFilter.java | 20 + .../unomi/graphql/CXSGraphQLProvider.java | 5 + .../org/apache/unomi/graphql/CXSMutation.java | 113 + .../graphql/CXSProfilePropertiesFilter.java | 34 ++ .../unomi/graphql/CXSPropertyTypeInput.java | 2 +- .../java/org/apache/unomi/graphql/CXSQuery.java | 52 ++ .../org/apache/unomi/graphql/CXSSegment.java| 32 ++ .../unomi/graphql/CXSSegmentCondition.java | 32 ++ .../java/org/apache/unomi/graphql/CXSView.java | 24 + .../unomi/graphql/builders/CXSBuilder.java | 23 + .../graphql/builders/CXSEventBuilders.java | 475 ++ .../internal/CXSGraphQLProviderImpl.java| 498 ++- graphql/karaf-feature/pom.xml | 2 + graphql/pom.xml | 2 +- 23 files changed, 1137 insertions(+), 449 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ccfa64fe/graphql/cxs-impl/pom.xml -- diff --git a/graphql/cxs-impl/pom.xml b/graphql/cxs-impl/pom.xml index ac3123d..3e29f66 100644 --- a/graphql/cxs-impl/pom.xml +++ b/graphql/cxs-impl/pom.xml @@ -26,6 +26,8 @@ 4.0.0 cxs-graphql-api-impl +Apache Unomi :: GraphQL API :: CXS Implementation +Apache Unomi Context GraphQL API CXS Implementation bundle http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ccfa64fe/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java index c278678..123dd87 100644 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java @@ -16,8 +16,7 @@ */ package org.apache.unomi.graphql; -import java.util.LinkedHashMap; -import java.util.Map; +import graphql.annotations.annotationTypes.GraphQLField; public class CXSEvent { @@ -26,33 +25,40 @@ public class CXSEvent { private long timeStamp; private String subject; private String object; -private Map properties = new LinkedHashMap<>(); +private CXSEventProperties properties = new CXSEventProperties(); private CXSGeoPoint location; +@GraphQLField public String getId() { return id; } +@GraphQLField public String getEventType() { return eventType; } +@GraphQLField public long getTimeStamp() { return timeStamp; } +@GraphQLField public String getSubject() { return subject; } +@GraphQLField public String getObject() { return object; } -public Map getProperties() { +@GraphQLField +public CXSEventProperties getProperties() { return properties; } +@GraphQLField public CXSGeoPoint getLocation() { return location; } http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ccfa64fe/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventConnection.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventConnection.java
[02/50] [abbrv] incubator-unomi git commit: UNOMI-202 make sure integration test don't interfere between each other
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/UNOMI-180-CXS-GRAPHQLAPI 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/src/test/resources/patch3.json index e2d25fb..fc3ff77 100644 --- a/itests/src/test/resources/patch3.json +++ b/itests/src/test/resources/patch3.json @@ -1,5 +1,5 @@ { - "itemId": "income-patch2", + "itemId": "income-patch1", "patchedItemId": "income", "patchedItemType": "propertyType", "operation": "remove"
[38/50] [abbrv] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Rename CXS to CDP
UNOMI-180 Implement CXS GraphQL API - Rename CXS to CDP Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/b0bb8d00 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/b0bb8d00 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/b0bb8d00 Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: b0bb8d00ab3b5659908ffa22d9d9e0ca5b0c44a5 Parents: e2f4e0d Author: Serge Huber Authored: Mon Nov 19 18:17:11 2018 +0100 Committer: Serge Huber Committed: Wed Nov 21 14:56:46 2018 +0100 -- graphql/cxs-impl/pom.xml| 6 +- .../unomi/graphql/CDPGraphQLProvider.java | 30 ++ .../org/apache/unomi/graphql/CDPMutation.java | 128 + .../graphql/CDPProfilePropertiesFilter.java | 35 ++ .../unomi/graphql/CDPProviderManager.java | 27 ++ .../java/org/apache/unomi/graphql/CDPQuery.java | 99 .../unomi/graphql/CXSGraphQLProvider.java | 30 -- .../org/apache/unomi/graphql/CXSMutation.java | 127 - .../graphql/CXSProfilePropertiesFilter.java | 35 -- .../unomi/graphql/CXSProviderManager.java | 27 -- .../java/org/apache/unomi/graphql/CXSQuery.java | 99 .../unomi/graphql/builders/CDPBuilder.java | 23 + .../graphql/builders/CDPBuildersUtils.java | 52 +++ .../graphql/builders/CDPEventBuilders.java | 465 +++ .../unomi/graphql/builders/CXSBuilder.java | 23 - .../graphql/builders/CXSBuildersUtils.java | 52 --- .../graphql/builders/CXSEventBuilders.java | 465 --- .../internal/CDPGraphQLProviderImpl.java| 245 ++ .../internal/CDPProviderManagerImpl.java| 111 + .../internal/CXSGraphQLProviderImpl.java| 245 -- .../internal/CXSProviderManagerImpl.java| 111 - .../propertytypes/CDPBooleanPropertyType.java | 51 ++ .../propertytypes/CDPDatePropertyType.java | 45 ++ .../propertytypes/CDPFloatPropertyType.java | 61 +++ .../propertytypes/CDPGeoPointPropertyType.java | 45 ++ .../CDPIdentifierPropertyType.java | 53 +++ .../propertytypes/CDPIntPropertyType.java | 61 +++ .../graphql/propertytypes/CDPPropertyType.java | 95 .../propertytypes/CDPSetPropertyType.java | 45 ++ .../propertytypes/CDPStringPropertyType.java| 54 +++ .../propertytypes/CXSBooleanPropertyType.java | 51 -- .../propertytypes/CXSDatePropertyType.java | 45 -- .../propertytypes/CXSFloatPropertyType.java | 61 --- .../propertytypes/CXSGeoPointPropertyType.java | 45 -- .../CXSIdentifierPropertyType.java | 53 --- .../propertytypes/CXSIntPropertyType.java | 61 --- .../graphql/propertytypes/CXSPropertyType.java | 95 .../propertytypes/CXSSetPropertyType.java | 45 -- .../propertytypes/CXSStringPropertyType.java| 54 --- .../graphql/types/input/CDPDateFilter.java | 32 ++ .../graphql/types/input/CDPEventFilter.java | 35 ++ .../graphql/types/input/CDPEventInput.java | 69 +++ .../input/CDPEventOccurrenceFilterInput.java| 35 ++ .../graphql/types/input/CDPEventTypeInput.java | 62 +++ .../types/input/CDPGeoDistanceInput.java| 32 ++ .../graphql/types/input/CDPGeoPointInput.java | 28 ++ .../graphql/types/input/CDPOrderByInput.java| 31 ++ .../types/input/CDPPropertyTypeInput.java | 76 +++ .../types/input/CDPSegmentFilterInput.java | 51 ++ .../types/input/CDPSetPropertyTypeInput.java| 46 ++ .../graphql/types/input/CXSDateFilter.java | 32 -- .../graphql/types/input/CXSEventFilter.java | 35 -- .../graphql/types/input/CXSEventInput.java | 69 --- .../input/CXSEventOccurrenceFilterInput.java| 35 -- .../graphql/types/input/CXSEventTypeInput.java | 62 --- .../types/input/CXSGeoDistanceInput.java| 32 -- .../graphql/types/input/CXSGeoPointInput.java | 28 -- .../graphql/types/input/CXSOrderByInput.java| 31 -- .../types/input/CXSPropertyTypeInput.java | 76 --- .../types/input/CXSSegmentFilterInput.java | 51 -- .../types/input/CXSSetPropertyTypeInput.java| 45 -- .../unomi/graphql/types/output/CDPEvent.java| 67 +++ .../types/output/CDPEventConnection.java| 32 ++ .../graphql/types/output/CDPEventEdge.java | 30 ++ .../graphql/types/output/CDPEventFilter.java| 32 ++ .../types/output/CDPEventOccurrenceFilter.java | 36 ++ .../types/output/CDPEventProperties.java| 35 ++ .../types/output/CDPEventPropertiesFilter.java | 23 + .../graphql/types/output/CDPEventType.java | 63 +++ .../types/output/CDPGeoDistanceUnit.java| 26 ++ .../unomi/graphql/types/output/CDPGeoPoint.java | 31 ++ .../unomi/graphql/types/output/CDPSegment.java | 32 ++
[50/50] [abbrv] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Event type registration and dynamic schema generation is now mostly working !
UNOMI-180 Implement CXS GraphQL API - Event type registration and dynamic schema generation is now mostly working ! Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/3d320bc9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/3d320bc9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/3d320bc9 Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: 3d320bc95a01962cc1c3a2c17fb3f3511e81387e Parents: f3f5f9e Author: Serge Huber Authored: Wed May 23 20:56:03 2018 +0200 Committer: Serge Huber Committed: Wed Nov 21 14:56:46 2018 +0100 -- .../internal/CXSGraphQLProviderImpl.java| 133 +-- .../internal/CXSProviderManagerImpl.java| 12 +- 2 files changed, 132 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/3d320bc9/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java index ea2043d..6d5a792 100644 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java @@ -16,12 +16,8 @@ */ package org.apache.unomi.graphql.internal; -import graphql.annotations.processor.GraphQLAnnotations; -import graphql.annotations.processor.retrievers.GraphQLFieldRetriever; -import graphql.annotations.processor.retrievers.GraphQLObjectInfoRetriever; -import graphql.annotations.processor.searchAlgorithms.BreadthFirstSearch; -import graphql.annotations.processor.searchAlgorithms.ParentalSearch; -import graphql.annotations.processor.typeBuilders.InputObjectBuilder; +import graphql.annotations.processor.GraphQLAnnotationsComponent; +import graphql.annotations.processor.ProcessingElementsContainer; import graphql.schema.*; import graphql.servlet.GraphQLMutationProvider; import graphql.servlet.GraphQLQueryProvider; @@ -38,6 +34,8 @@ import java.util.*; import static graphql.Scalars.*; import static graphql.schema.GraphQLArgument.newArgument; import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition; +import static graphql.schema.GraphQLInputObjectField.newInputObjectField; +import static graphql.schema.GraphQLInputObjectType.newInputObject; import static graphql.schema.GraphQLObjectType.newObject; public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryProvider, GraphQLTypesProvider, GraphQLMutationProvider { @@ -47,30 +45,97 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP private Map registeredOutputTypes = new TreeMap<>(); private Map registeredInputTypes = new TreeMap<>(); private CXSProviderManager cxsProviderManager; +private GraphQLAnnotationsComponent annotationsComponent; +private ProcessingElementsContainer container; private Map eventTypes = new TreeMap<>(); -public CXSGraphQLProviderImpl() { +public CXSGraphQLProviderImpl(GraphQLAnnotationsComponent annotationsComponent) { +this.annotationsComponent = annotationsComponent; +container = annotationsComponent.createContainer(); updateGraphQLTypes(); } private void updateGraphQLTypes() { -registeredOutputTypes.put(CXSGeoPoint.class.getName(), GraphQLAnnotations.object(CXSGeoPoint.class)); -registeredOutputTypes.put(CXSSetPropertyType.class.getName(), GraphQLAnnotations.object(CXSSetPropertyType.class)); + +registeredOutputTypes.put(CXSGeoPoint.class.getName(), annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSGeoPoint.class, container)); + registeredOutputTypes.put(CXSSetPropertyType.class.getName(),annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSSetPropertyType.class, container)); +registeredOutputTypes.put(CXSEventType.class.getName(), annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSEventType.class, container)); + +registeredInputTypes.put(CXSEventTypeInput.class.getName(), annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSEventTypeInput.class, container)); +registeredInputTypes.put("CXS_EventInput", buildCXSEventInputType()); + registeredOutputTypes.put("CXS_EventProperties", buildCXSEventPropertiesOutputType()); -registeredOutputTypes.put(CXSEventType.class.getName(), GraphQLAnnotations.object(CXSEventType.class)); +/*
[42/50] [abbrv] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - First implementation of registering event types. Not yet perfect but some parts are working.
UNOMI-180 Implement CXS GraphQL API - First implementation of registering event types. Not yet perfect but some parts are working. Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/f3f5f9ec Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/f3f5f9ec Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/f3f5f9ec Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: f3f5f9ecb84f51e9e5bf2e6ff0d7fbdf4bc78ef4 Parents: a120d3d Author: Serge Huber Authored: Thu May 17 21:33:59 2018 +0200 Committer: Serge Huber Committed: Wed Nov 21 14:56:46 2018 +0100 -- .../graphql/AbstractPropertyTypeInput.java | 40 - .../unomi/graphql/CXSBooleanPropertyType.java | 28 .../graphql/CXSBooleanPropertyTypeInput.java| 28 .../unomi/graphql/CXSDatePropertyType.java | 26 +++ .../unomi/graphql/CXSDatePropertyTypeInput.java | 26 --- .../org/apache/unomi/graphql/CXSEventType.java | 13 ++ .../unomi/graphql/CXSFloatPropertyType.java | 30 .../graphql/CXSFloatPropertyTypeInput.java | 30 .../unomi/graphql/CXSGeoPointPropertyType.java | 25 +++ .../graphql/CXSGeoPointPropertyTypeInput.java | 25 --- .../unomi/graphql/CXSGraphQLProvider.java | 2 + .../graphql/CXSIdentifierPropertyType.java | 28 .../graphql/CXSIdentifierPropertyTypeInput.java | 28 .../unomi/graphql/CXSIntPropertyType.java | 30 .../unomi/graphql/CXSIntPropertyTypeInput.java | 30 .../apache/unomi/graphql/CXSPropertyType.java | 26 +-- .../unomi/graphql/CXSPropertyTypeInput.java | 14 +- .../unomi/graphql/CXSProviderManager.java | 51 +- .../unomi/graphql/CXSSetPropertyType.java | 27 .../unomi/graphql/CXSSetPropertyTypeInput.java | 3 +- .../unomi/graphql/CXSStringPropertyType.java| 28 .../graphql/CXSStringPropertyTypeInput.java | 28 .../internal/CXSGraphQLProviderImpl.java| 157 +-- .../internal/CXSProviderManagerImpl.java| 80 ++ 24 files changed, 486 insertions(+), 317 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f3f5f9ec/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/AbstractPropertyTypeInput.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/AbstractPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/AbstractPropertyTypeInput.java deleted file mode 100644 index ad7ae5e..000 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/AbstractPropertyTypeInput.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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.graphql; - -import graphql.annotations.annotationTypes.GraphQLField; - -import java.util.List; - -public class AbstractPropertyTypeInput { - -@GraphQLField -public String id; -@GraphQLField -public String name; -@GraphQLField -public int minOccurrences; -@GraphQLField -public int maxOccurrences; -@GraphQLField -public List tags; -@GraphQLField -public List systemTags; -@GraphQLField -public boolean personalData; - -} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f3f5f9ec/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyType.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyType.java new file mode 100644 index 000..caea959 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyType.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this
[20/50] [abbrv] incubator-unomi git commit: UNOMI-208 Improve documentation - Add documentation for SSH Shell commands.
UNOMI-208 Improve documentation - Add documentation for SSH Shell commands. Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/67657bdb Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/67657bdb Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/67657bdb Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: 67657bdb11d3381f1cea81565ee41bf8f5a248f8 Parents: f502839 Author: Serge Huber Authored: Mon Nov 5 18:23:09 2018 +0100 Committer: Serge Huber Committed: Mon Nov 5 18:23:09 2018 +0100 -- manual/src/main/asciidoc/index.adoc | 2 + manual/src/main/asciidoc/shell-commands.adoc | 138 ++ 2 files changed, 140 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/67657bdb/manual/src/main/asciidoc/index.adoc -- diff --git a/manual/src/main/asciidoc/index.adoc b/manual/src/main/asciidoc/index.adoc index bf29433..ea1d4a1 100644 --- a/manual/src/main/asciidoc/index.adoc +++ b/manual/src/main/asciidoc/index.adoc @@ -68,6 +68,8 @@ include::consent-api.adoc[] include::building-and-deploying.adoc[] +include::shell-commands.adoc[] + include::extending-plugins.adoc[] include::custom-extensions.adoc[] http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/67657bdb/manual/src/main/asciidoc/shell-commands.adoc -- diff --git a/manual/src/main/asciidoc/shell-commands.adoc b/manual/src/main/asciidoc/shell-commands.adoc new file mode 100644 index 000..e69e2bc --- /dev/null +++ b/manual/src/main/asciidoc/shell-commands.adoc @@ -0,0 +1,138 @@ +// +// 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 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. +// +=== SSH Shell Commands + +Apache Unomi provides its own Apache Karaf Shell commands to make it easy to control the application +lifecycle or perform queries or modifications on the internal state of the system. + +All Apache Unomi-specific commands are namespaced and use the `unomi:` namespace. You can use the Apache Karaf Shell's +autocompletion to list all the commands available. + + Using the shell + +You can connect to the Apache Karaf SSH Shell using the following command: + +ssh -p 8102 karaf@localhost + +The default username/password is karaf/karaf. You should change this as soon as possible by editing the `etc/users.properties` file. + +Once connected you can simply type in : + +unomi: + +And hit the key to see the list of all the available Apache Unomi commands. Note that some commands +are only available when the application is started. + +You can also use the `help` command on any command such as in the following example: + +``` +karaf@root()> help unomi:migrate +DESCRIPTION +unomi:migrate + +This will Migrate your date in ES to be compliant with current version + +SYNTAX +unomi:migrate [fromVersionWithoutSuffix] + +ARGUMENTS +fromVersionWithoutSuffix +Origin version without suffix/qualifier (e.g: 1.2.0) +(defaults to 1.2.0) +``` + Lifecycle commands + +The commands control the lifecycle of the Apache Unomi server and are used to migrate, start or stop the server. + +.Table Lifecycle commands +|=== +|Command|Arguments|Description + +|migrate +|fromVersion +|This command must be used only when the Apache Unomi application is NOT STARTED. It will perform migration of the data stored in ElasticSearch using the argument fromVersion as a starting point. + +|stop +|n/a +|Shutsdown the Apache Unomi application + +|start +|n/a +|Starts the Apache Unomi application. Note that this state will be remembered between Apache Karaf launches, so in general it is only needed after a first installation or after a `migrate` command + +|version +|n/a +|Prints out the currently deployed version of the Apache Unomi application inside the Apache Karaf runtime. +|=== + + Runtime commands + +These commands are available once the application is running. If an argument is between brackets [] it means it is optional. + +.Table Runtime commands +|=== +|Command|Arguments|Description +|rule-list +|[--csv] +|Lists all the rules registered in the Apache Unomi
[27/50] [abbrv] incubator-unomi git commit: UNOMI-208 Improve documentation - Clarify salesforce setup procedure
UNOMI-208 Improve documentation - Clarify salesforce setup procedure Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/45ed86e1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/45ed86e1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/45ed86e1 Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: 45ed86e1b2935fd07f95a4045e4e8e80d5438e7d Parents: cb730a2 Author: Serge Huber Authored: Thu Nov 15 19:55:52 2018 +0100 Committer: Serge Huber Committed: Thu Nov 15 19:55:52 2018 +0100 -- .../connectors/salesforce-connector.adoc| 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/45ed86e1/manual/src/main/asciidoc/connectors/salesforce-connector.adoc -- diff --git a/manual/src/main/asciidoc/connectors/salesforce-connector.adoc b/manual/src/main/asciidoc/connectors/salesforce-connector.adoc index d200082..50c0332 100644 --- a/manual/src/main/asciidoc/connectors/salesforce-connector.adoc +++ b/manual/src/main/asciidoc/connectors/salesforce-connector.adoc @@ -18,6 +18,8 @@ Apache Unomi profiles and Salesforce Leads. Getting started += Salesforce account setup + . Create a new developer account here: + [source] @@ -49,6 +51,8 @@ Consumer secret (click to see it) click on your user at the top right, select "Settings", the click on "Reset my security token". You will receive an email with the security token. += Apache Unomi setup + . You are now ready to configure the Apache Unomi Salesforce Connector. In the etc/org.apache.unomi.sfdc.cfg file change the following settings: + @@ -60,7 +64,12 @@ sfdc.user.securityToken=YOUR_USER_SECURITY_TOKEN sfdc.consumer.key=CONNECTED_APP_CONSUMER_KEY sfdc.consumer.secret=CONNECTED_APP_SECRET -+ + += Deployment from Maven repository + +In this procedure we assume you have access to a Maven repository that contains a compiled version of the Salesforce connector. +If this is not the case or you prefer to deploy using a KAR bundle, see the KAR deployment instructions instead. + . Connect to the Apache Unomi Karaf Shell using : + [source] @@ -75,7 +84,18 @@ ssh -p 8102 karaf@localhost (default password is karaf) feature:repo-add mvn:org.apache.unomi/unomi-salesforce-connectors-karaf-kar/${project.version}/xml/features feature:install unomi-salesforce-connectors-karaf-kar -+ + += Deployment using KAR bundle + +If you have a KAR bundle (for example after building from source in the `extensions/salesforce-connector/karaf-kar/target` directory), +you can follow these steps to install : + +. Ensure that Apache Karaf and Apache Unomi are started +. Execute the following command in karaf: `feature:install unomi-salesforce-connector-karaf-kar` +. The installation is done ! + += Testing the connector + . You can then test the connection to Salesforce by accessing the following URLs: + [source]
[30/50] [abbrv] incubator-unomi git commit: v1.0.5
v1.0.5 Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/6833975e Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/6833975e Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/6833975e Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: 6833975e9798511d31d07e2c064621a6f8cf0a4c Parents: 45ed86e Author: Serge Huber Authored: Tue Nov 20 23:38:05 2018 +0100 Committer: Serge Huber Committed: Tue Nov 20 23:38:05 2018 +0100 -- .../javascript/dist/unomi-tracker.min.js.map| 1 + extensions/web-tracker/javascript/package.json | 4 +- .../web-tracker/javascript/snippet.min.js.map | 1 + .../archives/1.3/asciidoc/5-min-quickstart.adoc | 38 + .../connectors/mailchimp-connector.adoc | 100 ++ .../1.3/asciidoc/installing-tracker.adoc| 44 ++ manual/src/archives/1.3/asciidoc/patches.adoc | 102 ++ .../archives/1.3/asciidoc/shell-commands.adoc | 138 +++ 8 files changed, 426 insertions(+), 2 deletions(-) --
[26/50] [abbrv] incubator-unomi git commit: UNOMI-208 Improve documentation - Add properties mapping to Salesforce connector documentation
UNOMI-208 Improve documentation - Add properties mapping to Salesforce connector documentation Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/cb730a22 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/cb730a22 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/cb730a22 Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: cb730a228c6b8ac51c98875d5a432fcf68f1b798 Parents: 3b808ee Author: Serge Huber Authored: Thu Nov 15 18:27:52 2018 +0100 Committer: Serge Huber Committed: Thu Nov 15 18:27:52 2018 +0100 -- .../connectors/salesforce-connector.adoc| 23 +--- 1 file changed, 20 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cb730a22/manual/src/main/asciidoc/connectors/salesforce-connector.adoc -- diff --git a/manual/src/main/asciidoc/connectors/salesforce-connector.adoc b/manual/src/main/asciidoc/connectors/salesforce-connector.adoc index e3ff97b..d200082 100644 --- a/manual/src/main/asciidoc/connectors/salesforce-connector.adoc +++ b/manual/src/main/asciidoc/connectors/salesforce-connector.adoc @@ -90,9 +90,26 @@ Salesforce REST API to retrieve the limits of the Salesforce API. + Both URLs are password protected by the Apache Unomi (Karaf) password. You can find this user and password information in the etc/users.properties file. -+ -. You can now use the connectors's defined actions in rules to push or pull data to/from the Salesforce CRM. You can -find more information about rules in the <> and the link:getting-started.html[Getting Started] pages. + +You can now use the connectors's defined actions in rules to push or pull data to/from the Salesforce CRM. You can +find more information about rules in the <<_concepts,Concepts>> and the <<_getting_started_with_unomi,Getting Started>> pages. + + Properties + +To define how Salesforce attributes will be mapped to Marketing Factory profile properties, edit the following entry using the pattern below : + +[source] + +sfdc.fields.mappings=myMarketingFactoryProperty1<=>mySFDCAttribute1,myMarketingFactoryProperty2<=>mySFDCAttribute2 + + +Please note that Salesforce needs the company and the last name to be set, otherwise the lead won't be created. +An identifier needs to be set as well. The identifier will be used to map the Marketing Factory profile to the Salesforce lead. By default, the email is set as the identifier, meaning that if a lead in Salesforce and a profile in Marketing Factory have the same email, they'll be considered as the same person. + +[source] + +sfdc.fields.mappings.identifier=email<=>Email + Hot-deploying updates to the Salesforce connector (for developers)
[11/50] [abbrv] incubator-unomi git commit: UNOMI-204 fix typo
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/UNOMI-180-CXS-GRAPHQLAPI 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
[09/50] [abbrv] incubator-unomi git commit: UNOMI-202 fix scheduler for geonames service
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/UNOMI-180-CXS-GRAPHQLAPI 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
[40/50] [abbrv] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Initial framework for CXS GraphQL API. Lots of stuff is just testing, please don't consider it as finalized in any way
UNOMI-180 Implement CXS GraphQL API - Initial framework for CXS GraphQL API. Lots of stuff is just testing, please don't consider it as finalized in any way. Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/6491ac29 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/6491ac29 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/6491ac29 Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: 6491ac291c68d551c13e0ae67a9af6b2966f8388 Parents: b5c5893 Author: Serge Huber Authored: Thu May 3 12:42:32 2018 +0200 Committer: Serge Huber Committed: Wed Nov 21 14:56:46 2018 +0100 -- graphql/cxs-impl/pom.xml| 76 .../java/org/apache/unomi/graphql/CXSEvent.java | 59 ++ .../org/apache/unomi/graphql/CXSEventType.java | 26 +++ .../org/apache/unomi/graphql/CXSGeoPoint.java | 29 +++ .../unomi/graphql/CXSGraphQLProvider.java | 21 +++ .../org/apache/unomi/graphql/CXSProperties.java | 28 +++ .../apache/unomi/graphql/CXSPropertyType.java | 32 .../unomi/graphql/CXSProviderManager.java | 70 +++ .../internal/CXSGraphQLProviderImpl.java| 188 +++ graphql/karaf-feature/pom.xml | 126 + graphql/pom.xml | 44 + pom.xml | 1 + 12 files changed, 700 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6491ac29/graphql/cxs-impl/pom.xml -- diff --git a/graphql/cxs-impl/pom.xml b/graphql/cxs-impl/pom.xml new file mode 100644 index 000..ac3123d --- /dev/null +++ b/graphql/cxs-impl/pom.xml @@ -0,0 +1,76 @@ + + +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;> + +org.apache.unomi +unomi-graphql +1.3.0-incubating-SNAPSHOT + +4.0.0 + +cxs-graphql-api-impl +bundle + + + +com.graphql-java +graphql-java-servlet +${graphql.java.servlet.version} +provided + + +com.graphql-java +graphql-java +${graphql.java.version} +provided + + +io.github.graphql-java +graphql-java-annotations +${graphql.java.annotations.version} +provided + + +org.osgi +osgi.enterprise +6.0.0 +provided + + +org.osgi +osgi.core +6.0.0 +provided + + +org.apache.felix +org.apache.felix.scr.ds-annotations +1.2.4 +provided + + +org.slf4j +slf4j-api +1.7.21 +provided + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6491ac29/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java new file mode 100644 index 000..c278678 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java @@ -0,0 +1,59 @@ +/* + * 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.graphql; + +import java.util.LinkedHashMap; +import java.util.Map; + +public class CXSEvent { + +private String id; +private String eventType; +private long timeStamp; +private String subject; +private String object; +private Map properties = new LinkedHashMap<>(); +private CXSGeoPoint
[21/50] [abbrv] incubator-unomi git commit: UNOMI-208 convert mailchimp connector documentation to adoc
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/UNOMI-180-CXS-GRAPHQLAPI 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 at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the
[25/50] [abbrv] incubator-unomi git commit: UNOMI-208 Improve documentation - Backport doc improvements to 1.3.x documentation
UNOMI-208 Improve documentation - Backport doc improvements to 1.3.x documentation Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/3b808eed Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/3b808eed Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/3b808eed Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: 3b808eed14863c1e1f0c5fd751d19349717722af Parents: 3ade4d2 Author: Serge Huber Authored: Thu Nov 15 13:19:18 2018 +0100 Committer: Serge Huber Committed: Thu Nov 15 13:19:18 2018 +0100 -- .../1.3/asciidoc/building-and-deploying.adoc| 39 ++- .../archives/1.3/asciidoc/configuration.adoc| 14 ++- .../1.3/asciidoc/connectors/connectors.adoc | 7 +- .../connectors/salesforce-connector.adoc| 110 +++ .../1.3/asciidoc/custom-extensions.adoc | 4 +- .../archives/1.3/asciidoc/getting-started.adoc | 11 +- manual/src/archives/1.3/asciidoc/index.adoc | 29 +++-- .../1.3/asciidoc/samples/login-sample.adoc | 12 +- .../archives/1.3/asciidoc/samples/samples.adoc | 4 +- .../1.3/asciidoc/samples/twitter-sample.adoc| 2 +- .../asciidoc/samples/weather-update-sample.adoc | 2 +- 11 files changed, 94 insertions(+), 140 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/3b808eed/manual/src/archives/1.3/asciidoc/building-and-deploying.adoc -- diff --git a/manual/src/archives/1.3/asciidoc/building-and-deploying.adoc b/manual/src/archives/1.3/asciidoc/building-and-deploying.adoc index b285779..558ddd2 100644 --- a/manual/src/archives/1.3/asciidoc/building-and-deploying.adoc +++ b/manual/src/archives/1.3/asciidoc/building-and-deploying.adoc @@ -16,59 +16,54 @@ Initial Setup -1) Install J2SE 8.0 SDK (or later), which can be downloaded from +. Install J2SE 8.0 SDK (or later), which can be downloaded from http://www.oracle.com/technetwork/java/javase/downloads/index.html[http://www.oracle.com/technetwork/java/javase/downloads/index.html] -2) Make sure that your JAVA_HOME environment variable is set to the newly installed +. Make sure that your JAVA_HOME environment variable is set to the newly installed JDK location, and that your PATH includes %JAVA_HOME%\bin (windows) or $JAVA_HOME$/bin (unix). -3) Install Maven 3.0.3 (or later), which can be downloaded from +. Install Maven 3.0.3 (or later), which can be downloaded from http://maven.apache.org/download.html[http://maven.apache.org/download.html]. Make sure that your PATH includes the MVN_HOME/bin directory. Building -1) Change to the top level directory of Apache Unomi source distribution. -2) Run - +. Get the code: `git clone https://git-wip-us.apache.org/repos/asf/incubator-unomi.git` +. Change to the top level directory of Apache Unomi source distribution. +. Run ++ [source] $> mvn clean install - ++ This will compile Apache Unomi and run all of the tests in the Apache Unomi source distribution. Alternatively, you can run - ++ [source] $> mvn -P \!integration-tests,\!performance-tests clean install - ++ This will compile Apache Unomi without running the tests and takes less time to build. -3) The distributions will be available under "package/target" directory. +. The distributions will be available under "package/target" directory. Installing an ElasticSearch server Starting with version 1.2, Apache Unomi no longer embeds an ElasticSearch server as this is no longer supported by the developers of ElasticSearch. Therefore you will need to install a standalone ElasticSearch using the following steps: -. - Download an ElasticSearch version. Here's the version you will need depending on your version of Apache Unomi. Apache Unomi = 1.2 : https://www.elastic.co/downloads/past-releases/elasticsearch-5-1-2[https://www.elastic.co/downloads/past-releases/elasticsearch-5-1-2] Apache Unomi = 1.3 : https://www.elastic.co/downloads/past-releases/elasticsearch-5-6-3[https://www.elastic.co/downloads/past-releases/elasticsearch-5-6-3] -. - Uncompress the downloaded package into a directory -. - In the config/elasticsearch.yml file, uncomment and modify the following line : [source] @@ -76,8 +71,6 @@ In the config/elasticsearch.yml file, uncomment and modify the following line : cluster.name: contextElasticSearch -. - Launch the server using [source] @@ -86,8 +79,6 @@ bin/elasticsearch (Mac, Linux) bin\elasticsearch.bat (Windows) -. - Check that the ElasticSearch is up and running by accessing the following URL : http://localhost:9200[http://localhost:9200] @@ -128,8 +119,6 @@
[10/50] [abbrv] incubator-unomi git commit: UNOMI-206 Add endpoint to query events
UNOMI-206 Add endpoint to query events Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/291636af Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/291636af Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/291636af Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: 291636af49f81b21cf4bb6ddb13d532a33a28676 Parents: 300f197 Author: Serge Huber Authored: Mon Oct 22 20:43:26 2018 +0200 Committer: Serge Huber Committed: Mon Oct 22 20:43:26 2018 +0200 -- .../apache/unomi/rest/EventServiceEndpoint.java | 62 .../resources/OSGI-INF/blueprint/blueprint.xml | 16 + .../services/services/EventServiceImpl.java | 1 + 3 files changed, 79 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/291636af/rest/src/main/java/org/apache/unomi/rest/EventServiceEndpoint.java -- diff --git a/rest/src/main/java/org/apache/unomi/rest/EventServiceEndpoint.java b/rest/src/main/java/org/apache/unomi/rest/EventServiceEndpoint.java new file mode 100644 index 000..d9e028b --- /dev/null +++ b/rest/src/main/java/org/apache/unomi/rest/EventServiceEndpoint.java @@ -0,0 +1,62 @@ +/* + * 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.rest; + +import org.apache.cxf.rs.security.cors.CrossOriginResourceSharing; +import org.apache.unomi.api.Event; +import org.apache.unomi.api.PartialList; +import org.apache.unomi.api.query.Query; +import org.apache.unomi.api.services.EventService; + +import javax.jws.WebMethod; +import javax.jws.WebService; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +/** + * A JAX-RS endpoint to access information about the context server's events. + */ +@WebService +@Produces(MediaType.APPLICATION_JSON) +@CrossOriginResourceSharing( +allowAllOrigins = true, +allowCredentials = true +) +public class EventServiceEndpoint { + +private EventService eventService; + +@WebMethod(exclude = true) +public void setEventService(EventService eventService) { +this.eventService = eventService; +} + +/** + * Allows to search events using a query. + * @param query the query object to use to search for events. You can specify offset and limits along with a + * condition tree. + * @return a partial list containing the events that match the query. + */ +@POST +@Path("/search") +public PartialList searchEvents(Query query) { +return eventService.searchEvents(query.getCondition(), query.getOffset(), query.getLimit()); +} + +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/291636af/rest/src/main/resources/OSGI-INF/blueprint/blueprint.xml -- diff --git a/rest/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/rest/src/main/resources/OSGI-INF/blueprint/blueprint.xml index 082bf7b..4390c64 100644 --- a/rest/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ b/rest/src/main/resources/OSGI-INF/blueprint/blueprint.xml @@ -190,6 +190,18 @@ + + + + + + + + + + + + @@ -250,6 +262,10 @@ + + + + http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/291636af/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 5217e55..ca8482c 100644 --- a/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java +++
[14/50] [abbrv] 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([],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&if(!s&)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&,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&(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&(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]&[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&(n.ajs_uid,r),n.ajs_event&(n.ajs _event,o),n.ajs_aid&(n.ajs_aid),this},r.prototype.normalize=function(t){return t=O(t,k(this._integrations)),t.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(){return
[37/50] [abbrv] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Rename CXS to CDP
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b0bb8d00/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSEventBuilders.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSEventBuilders.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSEventBuilders.java deleted file mode 100644 index 8c616d4..000 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSEventBuilders.java +++ /dev/null @@ -1,465 +0,0 @@ -/* - * 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.graphql.builders; - -import graphql.annotations.processor.GraphQLAnnotationsComponent; -import graphql.annotations.processor.ProcessingElementsContainer; -import graphql.schema.*; -import org.apache.unomi.graphql.propertytypes.*; -import org.apache.unomi.graphql.types.input.CXSEventInput; -import org.apache.unomi.graphql.types.input.CXSEventOccurrenceFilterInput; -import org.apache.unomi.graphql.types.output.CXSEvent; -import org.apache.unomi.graphql.types.output.CXSEventProperties; -import org.apache.unomi.graphql.types.output.CXSEventType; -import org.apache.unomi.graphql.types.output.PageInfo; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import static graphql.Scalars.*; -import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition; -import static graphql.schema.GraphQLInputObjectField.newInputObjectField; -import static graphql.schema.GraphQLInputObjectType.newInputObject; -import static graphql.schema.GraphQLObjectType.newObject; - -public class CXSEventBuilders implements CXSBuilder { - -private GraphQLAnnotationsComponent annotationsComponent; -private ProcessingElementsContainer container; -private Map eventTypes; -private Map typeRegistry; - -public CXSEventBuilders(GraphQLAnnotationsComponent annotationsComponent, -ProcessingElementsContainer container, -Map eventTypes) { -this.annotationsComponent = annotationsComponent; -this.container = container; -this.eventTypes = eventTypes; -this.typeRegistry = container.getTypeRegistry(); -} - -@Override -public void updateTypes() { -Map typeRegistry = container.getTypeRegistry(); -typeRegistry.put("CXS_EventInput", buildCXSEventInputType()); -typeRegistry.put("CXS_EventOccurrenceFilterInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSEventOccurrenceFilterInput.class, container)); -typeRegistry.put("CXS_EventPropertiesFilterInput", buildCXSEventPropertiesFilterInput()); -typeRegistry.put("CXS_EventFilterInput", buildCXSEventFilterInputType()); -typeRegistry.put("CXS_EventProperties", buildCXSEventPropertiesOutputType()); -typeRegistry.put("CXS_Event", buildCXSEventOutputType()); -typeRegistry.put("CXS_EventEdge", buildCXSEventEdgeOutputType()); -typeRegistry.put("CXS_EventConnection", buildCXSEventConnectionOutputType()); -} - -private GraphQLOutputType buildCXSEventEdgeOutputType() { -return newObject() -.name("CXS_EventEdge") -.description("The Relay edge type for the CXS_Event output type") -.field(newFieldDefinition() -.name("node") -.type((GraphQLOutputType) typeRegistry.get("CXS_Event")) -) -.field(newFieldDefinition() -.name("cursor") -.type(GraphQLString) -) -.build(); -} - -private GraphQLOutputType buildCXSEventConnectionOutputType() { -return newObject() -.name("CXS_EventConnection") -.description("The Relay connection type for the CXS_Event output type") -.field(newFieldDefinition() -.name("edges") -.type(new GraphQLList(typeRegistry.get("CXS_EventEdge"))) -) -.field(newFieldDefinition() -
[36/50] [abbrv] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Rename CXS to CDP
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b0bb8d00/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSDatePropertyType.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSDatePropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSDatePropertyType.java deleted file mode 100644 index bd5d0a1..000 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSDatePropertyType.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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.graphql.propertytypes; - -import graphql.annotations.annotationTypes.GraphQLField; -import graphql.annotations.annotationTypes.GraphQLName; - -import java.util.List; - -@GraphQLName("CXS_DatePropertyType") -public class CXSDatePropertyType extends CXSPropertyType { - -private String defaultValue; - -public CXSDatePropertyType(@GraphQLName("id") String id, - @GraphQLName("name") String name, - @GraphQLName("minOccurrences") Integer minOccurrences, - @GraphQLName("maxOccurrences") Integer maxOccurrences, - @GraphQLName("tags") List tags, - @GraphQLName("systemTags") List systemTags, - @GraphQLName("personalData") Boolean personalData, - @GraphQLName("defaultValue") String defaultValue) { -super(id, name, minOccurrences, maxOccurrences, tags, systemTags, personalData); -this.defaultValue = defaultValue; -} - -@GraphQLField -public String getDefaultValue() { -return defaultValue; -} -} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b0bb8d00/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSFloatPropertyType.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSFloatPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSFloatPropertyType.java deleted file mode 100644 index e53b28b..000 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSFloatPropertyType.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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.graphql.propertytypes; - -import graphql.annotations.annotationTypes.GraphQLField; -import graphql.annotations.annotationTypes.GraphQLName; - -import java.util.List; - -@GraphQLName("CXS_FloatPropertyType") -public class CXSFloatPropertyType extends CXSPropertyType { - -private Double minValue; -private Double maxValue; -private Double defaultValue; - -public CXSFloatPropertyType(@GraphQLName("id") String id, -@GraphQLName("name") String name, -@GraphQLName("minOccurrences") Integer minOccurrences, -@GraphQLName("maxOccurrences") Integer maxOccurrences, -@GraphQLName("tags") List tags, -@GraphQLName("systemTags") List systemTags, -@GraphQLName("personalData") Boolean
[41/50] [abbrv] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - We now have basic filtering generation for event types working !
UNOMI-180 Implement CXS GraphQL API - We now have basic filtering generation for event types working ! Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/85017148 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/85017148 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/85017148 Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: 85017148d2cbacfb1452510d29ab86390d865e65 Parents: 3d320bc Author: Serge Huber Authored: Mon May 28 15:07:00 2018 +0200 Committer: Serge Huber Committed: Wed Nov 21 14:56:46 2018 +0100 -- .../unomi/graphql/CXSDateFilterInput.java | 30 ++ .../graphql/CXSEventOccurrenceFilterInput.java | 33 +++ .../unomi/graphql/CXSGeoDistanceInput.java | 28 ++ .../unomi/graphql/CXSGeoDistanceUnit.java | 23 ++ .../apache/unomi/graphql/CXSGeoPointInput.java | 26 ++ .../apache/unomi/graphql/CXSOrderByInput.java | 28 ++ .../org/apache/unomi/graphql/CXSSortOrder.java | 23 ++ .../java/org/apache/unomi/graphql/PageInfo.java | 28 ++ .../internal/CXSGraphQLProviderImpl.java| 285 ++- 9 files changed, 496 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/85017148/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDateFilterInput.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDateFilterInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDateFilterInput.java new file mode 100644 index 000..f92759e --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDateFilterInput.java @@ -0,0 +1,30 @@ +/* + * 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.graphql; + +import graphql.annotations.annotationTypes.GraphQLField; + +public class CXSDateFilterInput { +@GraphQLField +public long after; +@GraphQLField +public boolean includeAfter; +@GraphQLField +public long before; +@GraphQLField +public boolean includeBefore; +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/85017148/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilterInput.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilterInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilterInput.java new file mode 100644 index 000..83d23da --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilterInput.java @@ -0,0 +1,33 @@ +/* + * 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.graphql; + +import graphql.annotations.annotationTypes.GraphQLField; + +public class CXSEventOccurrenceFilterInput { + +@GraphQLField +public String eventId; +@GraphQLField +public String beforeTime; +@GraphQLField +public String afterTime; +@GraphQLField +public String betweenTime; +@GraphQLField +public int count; +}
[45/50] [abbrv] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API Big refactoring, will now use a mixture of annotations and manually declared fields to build dynamic fields in schema. B
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ccfa64fe/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java index a0596cc..a3c299d 100644 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java @@ -23,339 +23,83 @@ import graphql.servlet.GraphQLMutationProvider; import graphql.servlet.GraphQLQueryProvider; import graphql.servlet.GraphQLTypesProvider; import org.apache.unomi.graphql.*; -import org.osgi.framework.BundleContext; -import org.osgi.service.component.ComponentContext; -import org.osgi.service.component.annotations.Deactivate; +import org.apache.unomi.graphql.builders.CXSEventBuilders; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.*; -import static graphql.Scalars.*; +import static graphql.Scalars.GraphQLInt; +import static graphql.Scalars.GraphQLString; import static graphql.schema.GraphQLArgument.newArgument; import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition; -import static graphql.schema.GraphQLInputObjectField.newInputObjectField; -import static graphql.schema.GraphQLInputObjectType.newInputObject; import static graphql.schema.GraphQLObjectType.newObject; public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryProvider, GraphQLTypesProvider, GraphQLMutationProvider { private static final Logger logger = LoggerFactory.getLogger(CXSGraphQLProviderImpl.class.getName()); -private Map registeredOutputTypes = new TreeMap<>(); -private Map registeredInputTypes = new TreeMap<>(); private CXSProviderManager cxsProviderManager; private GraphQLAnnotationsComponent annotationsComponent; private ProcessingElementsContainer container; +private CXSEventBuilders cxsEventBuilders; +private Map typeRegistry; private Map eventTypes = new TreeMap<>(); public CXSGraphQLProviderImpl(GraphQLAnnotationsComponent annotationsComponent) { this.annotationsComponent = annotationsComponent; container = annotationsComponent.createContainer(); +typeRegistry = container.getTypeRegistry(); +cxsEventBuilders = new CXSEventBuilders(annotationsComponent, container, eventTypes); updateGraphQLTypes(); } -private void updateGraphQLTypes() { - -registeredOutputTypes.put(PageInfo.class.getName(), annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(PageInfo.class, container)); - -registeredOutputTypes.put(CXSGeoPoint.class.getName(), annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSGeoPoint.class, container)); - registeredOutputTypes.put(CXSSetPropertyType.class.getName(),annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSSetPropertyType.class, container)); -registeredOutputTypes.put(CXSEventType.class.getName(), annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSEventType.class, container)); - -registeredInputTypes.put(CXSGeoDistanceInput.class.getName(), annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSGeoDistanceInput.class, container)); -registeredInputTypes.put(CXSDateFilterInput.class.getName(), annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSDateFilterInput.class, container)); -registeredInputTypes.put(CXSEventTypeInput.class.getName(), annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSEventTypeInput.class, container)); -registeredInputTypes.put(CXSOrderByInput.class.getName(), annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSOrderByInput.class, container)); -registeredInputTypes.put("CXS_EventInput", buildCXSEventInputType()); - registeredInputTypes.put(CXSEventOccurrenceFilterInput.class.getName(), annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSEventOccurrenceFilterInput.class, container)); -registeredInputTypes.put("CXS_EventPropertiesFilterInput", buildCXSEventPropertiesFilterInput()); -registeredInputTypes.put("CXS_EventFilterInput", buildCXSEventFilterInputType()); - -registeredOutputTypes.put("CXS_EventProperties", buildCXSEventPropertiesOutputType()); - -registeredOutputTypes.put("CXS_Event", buildCXSEventOutputType()); -registeredOutputTypes.put("CXS_EventEdge", buildCXSEventEdgeOutputType()); -registeredOutputTypes.put("CXS_EventConnection", buildCXSEventConnectionOutputType()); -registeredOutputTypes.put("CXS_Query", buildCXSQueryOutputType()); -
[17/50] [abbrv] incubator-unomi git commit: UNOMI-187 improve readme
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/UNOMI-180-CXS-GRAPHQLAPI 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`.
[23/50] [abbrv] 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
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/UNOMI-180-CXS-GRAPHQLAPI 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 Unomi Context Server extension that integrates with the Geonames database
[31/50] [abbrv] incubator-unomi git commit: UNOMI-187 Integrate analytics.js - Add sourcemaps - Add support for tags, categories and interests
UNOMI-187 Integrate analytics.js - Add sourcemaps - Add support for tags, categories and interests Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/5bcb4c1b Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/5bcb4c1b Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/5bcb4c1b Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: 5bcb4c1bcebbb55ac0e029dd9515db32c584b909 Parents: 6833975 Author: Serge Huber Authored: Tue Nov 20 23:43:50 2018 +0100 Committer: Serge Huber Committed: Tue Nov 20 23:43:50 2018 +0100 -- .../javascript/dist/unomi-tracker.js| 8 ++- .../javascript/dist/unomi-tracker.min.js| 2 +- .../web-tracker/javascript/snippet.min.js | 3 +- .../analytics.js-integration-apache-unomi.js| 4 +- .../web-tracker/wab/src/main/webapp/index.html | 24 +++ .../src/main/asciidoc/installing-tracker.adoc | 73 +++- pom.xml | 1 + 7 files changed, 108 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/5bcb4c1b/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 7f45ec3..707632e 100644 --- a/extensions/web-tracker/javascript/dist/unomi-tracker.js +++ b/extensions/web-tracker/javascript/dist/unomi-tracker.js @@ -11856,7 +11856,7 @@ module.exports = uuid; },{"./rng":94}],96:[function(require,module,exports){ module.exports={ "name": "unomi-analytics", - "version": "1.0.3", + "version": "1.0.4", "description": "The Apache Unomi analytics.js integration.", "main": "dist/unomi-tracker.js", "keywords": [ @@ -11871,7 +11871,7 @@ module.exports={ "browserify": "browserify src/index.js -p [ browserify-header --file src/license.js ] -s unomiTracker -o dist/unomi-tracker.js", "replace": "replace-in-file 'analytics.require = require' '//analytics.require = require' dist/unomi-tracker.js", "minify": "uglifyjs -c -m --comments '/@license/' -o dist/unomi-tracker.min.js -- dist/unomi-tracker.js", -"snippet:minify": "uglifyjs -c -m -o snippet.min.js -- snippet.js", +"snippet:minify": "uglifyjs -c -m -o snippet.min.js --source-map snippet.min.js.map -- snippet.js", "clean": "rimraf *.log dist/unomi-tracker.js dist/unomi-tracker.min.js", "clean:all": "yarn clean && rimraf node_modules" }, @@ -11997,7 +11997,7 @@ Unomi.prototype.loaded = function() { * @param {Page} page */ Unomi.prototype.onpage = function(page) { -var unomiPage = { pageInfo:{} }; +var unomiPage = { }; this.fillPageData(unomiPage, page.json().properties); this.collectEvent(this.buildEvent('view', this.buildPage(unomiPage), this.buildSource(this.options.scope, 'site'))); @@ -12006,6 +12006,8 @@ Unomi.prototype.onpage = function(page) { Unomi.prototype.fillPageData = function(unomiPage, props) { unomiPage.attributes = []; unomiPage.consentTypes = []; +unomiPage.interests = props.interests || {}; +unomiPage.pageInfo = unomiPage.pageInfo || props.pageInfo || {}; unomiPage.pageInfo.pageName = unomiPage.pageInfo.pageName || props.title; unomiPage.pageInfo.pageID = unomiPage.pageInfo.pageID || props.path; unomiPage.pageInfo.pagePath = unomiPage.pageInfo.pagePath || props.path; http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/5bcb4c1b/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 c3993ec..75fe41b 100644 --- a/extensions/web-tracker/javascript/dist/unomi-tracker.min.js +++ b/extensions/web-tracker/javascript/dist/unomi-tracker.min.js @@ -25,4 +25,4 @@ return this.prototype.globals.push(t),this},n.assumesPageview=function(){return * @license MIT */ var r,o=Object.prototype,i=o.hasOwnProperty,a=o.toString;"function"==typeof Symbol&&(r=Symbol.prototype.valueOf);var s=function(t){return t!==t},c={boolean:1,number:1,string:1,undefined:1},u=/^([A-Za-z0-9+\/]{4})*([A-Za-z0-9+\/]{4}|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{2}==)$/,p=/^[A-Fa-f0-9]+$/,l={};l.a=l.type=function(t,e){return typeof t===e},l.defined=function(t){return void 0!==t},l.empty=function(t){var e,n=a.call(t);if("[object Array]"===n||"[object Arguments]"===n||"[object String]"===n)return 0===t.length;if("[object Object]"===n){for(e in t)if(i.call(t,e))return!1;return!0}return!t},l.equal=function(t,e){if(t===e)return!0;var
[07/50] [abbrv] 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. - -##
[49/50] [abbrv] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Started implementing mutation for event type definitions, but still struggling with some limitations in the graphql-ja
UNOMI-180 Implement CXS GraphQL API - Started implementing mutation for event type definitions, but still struggling with some limitations in the graphql-java-annotations project, notably it doesn't easily provide a way to build input types, and it seems to prefix all input types with "Input" which is not something wanted as we have already postfixed them. Postfixing seems to be more of a conventation than prefixing them in the GraphQL world. Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/a120d3dd Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/a120d3dd Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/a120d3dd Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: a120d3ddb50a6f228306b4f8595a27e11c0e3578 Parents: 6491ac2 Author: Serge Huber Authored: Fri May 11 14:52:56 2018 +0200 Committer: Serge Huber Committed: Wed Nov 21 14:56:46 2018 +0100 -- .../graphql/AbstractPropertyTypeInput.java | 40 ++ .../graphql/CXSBooleanPropertyTypeInput.java| 28 ++ .../unomi/graphql/CXSDatePropertyTypeInput.java | 26 + .../apache/unomi/graphql/CXSEventTypeInput.java | 36 + .../graphql/CXSFloatPropertyTypeInput.java | 30 +++ .../graphql/CXSGeoPointPropertyTypeInput.java | 25 + .../graphql/CXSIdentifierPropertyTypeInput.java | 28 ++ .../unomi/graphql/CXSIntPropertyTypeInput.java | 30 +++ .../unomi/graphql/CXSPropertyTypeInput.java | 56 .../unomi/graphql/CXSSetPropertyTypeInput.java | 27 ++ .../graphql/CXSStringPropertyTypeInput.java | 28 ++ .../internal/CXSGraphQLProviderImpl.java| 43 ++- 12 files changed, 396 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/a120d3dd/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/AbstractPropertyTypeInput.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/AbstractPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/AbstractPropertyTypeInput.java new file mode 100644 index 000..ad7ae5e --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/AbstractPropertyTypeInput.java @@ -0,0 +1,40 @@ +/* + * 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.graphql; + +import graphql.annotations.annotationTypes.GraphQLField; + +import java.util.List; + +public class AbstractPropertyTypeInput { + +@GraphQLField +public String id; +@GraphQLField +public String name; +@GraphQLField +public int minOccurrences; +@GraphQLField +public int maxOccurrences; +@GraphQLField +public List tags; +@GraphQLField +public List systemTags; +@GraphQLField +public boolean personalData; + +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/a120d3dd/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyTypeInput.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyTypeInput.java new file mode 100644 index 000..3843f5a --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyTypeInput.java @@ -0,0 +1,28 @@ +/* + * 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 + * + *
[39/50] [abbrv] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Event output field generation is working again, input will be harder because of the way the objects are prefixed with
UNOMI-180 Implement CXS GraphQL API - Event output field generation is working again, input will be harder because of the way the objects are prefixed with the input naming convention Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/146e7552 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/146e7552 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/146e7552 Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: 146e7552b349670c40e7ff38cd95239bee9bdb43 Parents: c447bef Author: Serge Huber Authored: Fri Jul 27 22:12:41 2018 +0200 Committer: Serge Huber Committed: Wed Nov 21 14:56:46 2018 +0100 -- .../java/org/apache/unomi/graphql/CXSQuery.java | 6 +++ .../graphql/builders/CXSBuildersUtils.java | 52 .../graphql/builders/CXSEventBuilders.java | 24 ++--- .../internal/CXSGraphQLProviderImpl.java| 24 +++-- 4 files changed, 70 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/146e7552/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSQuery.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSQuery.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSQuery.java index 24d11ff..7b548a9 100644 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSQuery.java +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSQuery.java @@ -26,6 +26,12 @@ import java.util.List; @GraphQLName("CXS_Query") public class CXSQuery { +CXSGraphQLProvider cxsGraphQLProvider; + +public CXSQuery(CXSGraphQLProvider cxsGraphQLProvider) { +this.cxsGraphQLProvider = cxsGraphQLProvider; +} + @GraphQLField public List getEventTypes() { return new ArrayList<>(); http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/146e7552/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSBuildersUtils.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSBuildersUtils.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSBuildersUtils.java new file mode 100644 index 000..3d9c586 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSBuildersUtils.java @@ -0,0 +1,52 @@ +/* + * 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.graphql.builders; + +import graphql.annotations.processor.GraphQLAnnotationsComponent; +import graphql.annotations.processor.ProcessingElementsContainer; +import graphql.schema.GraphQLInputObjectType; +import graphql.schema.GraphQLObjectType; + +public class CXSBuildersUtils { + +public static GraphQLObjectType.Builder getOutputBuilderFromAnnotatedClass( +GraphQLAnnotationsComponent annotationsComponent, +ProcessingElementsContainer container, +String typeName, +Class annotatedClass) { +if (typeName == null) { +typeName = annotatedClass.getName(); +} +return GraphQLObjectType.newObject() +.name(typeName) +.fields(((GraphQLObjectType) annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(annotatedClass, container)).getFieldDefinitions()); +} + +public static GraphQLInputObjectType.Builder getInputBuilderFromAnnotatedClass( +GraphQLAnnotationsComponent annotationsComponent, +ProcessingElementsContainer container, +String typeName, +Class annotatedClass) { +if (typeName == null) { +typeName = annotatedClass.getName(); +} +return GraphQLInputObjectType.newInputObject() +.name(typeName) +.fields(((GraphQLInputObjectType)
[16/50] [abbrv] incubator-unomi git commit: UNOMI-207 fix properties mapping issue when merging mappings from different index
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/UNOMI-180-CXS-GRAPHQLAPI 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) { +mergePropertiesMapping((Map) subResult.get(subentry.getKey()), (Map) subentry.getValue()); +} else { +
[08/50] [abbrv] 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/UNOMI-180-CXS-GRAPHQLAPI 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 signature file for the
[34/50] [abbrv] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Add some example operators for String filters - Add the possibility to provide a "or" operator as a default for proper
UNOMI-180 Implement CXS GraphQL API - Add some example operators for String filters - Add the possibility to provide a "or" operator as a default for property matching using a seperate "properties_or" field Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/fce8f64f Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/fce8f64f Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/fce8f64f Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: fce8f64fe6545800151e7b5be7dac9c85ee0e372 Parents: 8501714 Author: Serge Huber Authored: Fri Jun 8 11:11:51 2018 +0200 Committer: Serge Huber Committed: Wed Nov 21 14:56:46 2018 +0100 -- .../unomi/graphql/internal/CXSGraphQLProviderImpl.java | 12 1 file changed, 12 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/fce8f64f/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java index 2c7a0b4..a0596cc 100644 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java @@ -189,6 +189,14 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP .name(propertyName + "_regexp") .type(GraphQLString) ); +inputTypeBuilder.field(newInputObjectField() +.name(propertyName + "_startsWith") +.type(GraphQLString) +); +inputTypeBuilder.field(newInputObjectField() +.name(propertyName + "_contains") +.type(new GraphQLList(GraphQLString)) +); } private void addBooleanFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) { @@ -275,6 +283,10 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP .type(registeredInputTypes.get("CXS_EventPropertiesFilterInput")) ) .field(newInputObjectField() +.name("properties_or") + .type(registeredInputTypes.get("CXS_EventPropertiesFilterInput")) +) +.field(newInputObjectField() .name("eventOccurrence") .type(registeredInputTypes.get(CXSEventOccurrenceFilterInput.class.getName())) );
[04/50] [abbrv] incubator-unomi git commit: UNOMI-205 remove files
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 - - - - - -
[24/50] [abbrv] incubator-unomi git commit: UNOMI-208 Improve documentation - Fix cross-references - Fix numbering in certain sections - Add documentation on port number change
UNOMI-208 Improve documentation - Fix cross-references - Fix numbering in certain sections - Add documentation on port number change Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/3ade4d26 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/3ade4d26 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/3ade4d26 Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: 3ade4d26a610e052e9e20261d1e6e0611bb5cb35 Parents: 23b556f Author: Serge Huber Authored: Thu Nov 15 13:01:23 2018 +0100 Committer: Serge Huber Committed: Thu Nov 15 13:01:23 2018 +0100 -- manual/pom.xml | 56 +- .../main/asciidoc/building-and-deploying.adoc | 22 ++-- manual/src/main/asciidoc/configuration.adoc | 10 ++ .../main/asciidoc/connectors/connectors.adoc| 7 +- .../connectors/mailchimp-connector.adoc | 2 +- .../connectors/salesforce-connector.adoc| 110 +++ manual/src/main/asciidoc/custom-extensions.adoc | 4 +- manual/src/main/asciidoc/getting-started.adoc | 6 +- .../src/main/asciidoc/samples/login-sample.adoc | 2 +- manual/src/main/asciidoc/samples/samples.adoc | 4 +- .../main/asciidoc/samples/twitter-sample.adoc | 2 +- .../asciidoc/samples/weather-update-sample.adoc | 2 +- 12 files changed, 106 insertions(+), 121 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/3ade4d26/manual/pom.xml -- diff --git a/manual/pom.xml b/manual/pom.xml index bf1c47f..71bc125 100644 --- a/manual/pom.xml +++ b/manual/pom.xml @@ -46,7 +46,7 @@ org.asciidoctor asciidoctor-maven-plugin -1.5.6 +1.5.7.1 output-html @@ -55,6 +55,12 @@ process-asciidoc + index.adoc + ${doc.source} + ${doc.output.html} + true +true +${doc.source}/images html5 article @@ -67,11 +73,6 @@ -${doc.source} - ${doc.output.html} -true -true -${doc.source}/images @@ -86,7 +87,7 @@ org.asciidoctor asciidoctor-maven-plugin -1.5.6 +1.5.7.1 org.asciidoctor @@ -94,26 +95,6 @@ 1.5.0-alpha.16 - -${doc.source} - ${doc.output.pdf} -true -true -pdf - - ${project.version} - ${project.basedir}/src/theme -apache - ${project.basedir}/src/theme/fonts -images -font -true - - -- -true - - generate-pdf-doc @@ -121,6 +102,27 @@ process-asciidoc + + index.adoc + ${doc.source} + ${doc.output.pdf} + true +true +pdf + +
[48/50] [abbrv] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API Get event type creation to work (partially, the event GraphQL schema types are not yet properly modified)
UNOMI-180 Implement CXS GraphQL API Get event type creation to work (partially, the event GraphQL schema types are not yet properly modified) Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/f4e2503e Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/f4e2503e Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/f4e2503e Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: f4e2503eb3b72a5256afd6587cffadfe0c0c6aa0 Parents: ccfa64f Author: Serge Huber Authored: Fri Jul 27 17:45:05 2018 +0200 Committer: Serge Huber Committed: Wed Nov 21 14:56:46 2018 +0100 -- .../unomi/graphql/CXSBooleanPropertyType.java | 28 .../unomi/graphql/CXSDatePropertyType.java | 26 .../org/apache/unomi/graphql/CXSEventType.java | 34 - .../apache/unomi/graphql/CXSEventTypeInput.java | 33 - .../unomi/graphql/CXSFloatPropertyType.java | 30 - .../unomi/graphql/CXSGeoPointPropertyType.java | 25 .../graphql/CXSIdentifierPropertyType.java | 28 .../unomi/graphql/CXSIntPropertyType.java | 30 - .../org/apache/unomi/graphql/CXSMutation.java | 88 +++-- .../apache/unomi/graphql/CXSPropertyType.java | 40 -- .../unomi/graphql/CXSPropertyTypeInput.java | 20 +++ .../unomi/graphql/CXSSetPropertyType.java | 27 .../unomi/graphql/CXSSetPropertyTypeInput.java | 21 ++- .../unomi/graphql/CXSStringPropertyType.java| 28 .../graphql/builders/CXSEventBuilders.java | 31 ++--- .../internal/CXSGraphQLProviderImpl.java| 127 +-- .../internal/CXSProviderManagerImpl.java| 2 - .../propertytypes/CXSBooleanPropertyType.java | 51 .../propertytypes/CXSDatePropertyType.java | 44 +++ .../propertytypes/CXSFloatPropertyType.java | 60 + .../propertytypes/CXSGeoPointPropertyType.java | 44 +++ .../CXSIdentifierPropertyType.java | 52 .../propertytypes/CXSIntPropertyType.java | 60 + .../graphql/propertytypes/CXSPropertyType.java | 94 ++ .../propertytypes/CXSSetPropertyType.java | 44 +++ .../propertytypes/CXSStringPropertyType.java| 53 26 files changed, 671 insertions(+), 449 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f4e2503e/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyType.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyType.java deleted file mode 100644 index caea959..000 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyType.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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.graphql; - -import graphql.annotations.annotationTypes.GraphQLField; -import graphql.annotations.annotationTypes.GraphQLName; - -@GraphQLName("CXSBooleanPropertyType") -public class CXSBooleanPropertyType extends CXSPropertyType { - -@GraphQLField -public boolean defaultValue; - -} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f4e2503e/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDatePropertyType.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDatePropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDatePropertyType.java deleted file mode 100644 index 362d2bc..000 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDatePropertyType.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for
[06/50] [abbrv] 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
[01/50] [abbrv] incubator-unomi git commit: UNOMI-202 fix issue with scheduler, add missing parameters to setup the scheduler [Forced Update!]
Repository: incubator-unomi Updated Branches: refs/heads/UNOMI-180-CXS-GRAPHQLAPI cfc12dad0 -> b0bb8d00a (forced update) 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/UNOMI-180-CXS-GRAPHQLAPI 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 @@
[03/50] [abbrv] incubator-unomi git commit: UNOMI-202 add test with patch on ConditionType and ActionType
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/UNOMI-180-CXS-GRAPHQLAPI 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": [ +"profileTags", +"event", +"condition", +"eventCondition", +"trackedCondition" + ] +} + ] +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/5ed92f9c/itests/src/test/resources/patch5.json
[33/50] [abbrv] incubator-unomi git commit: UNOMI-187 Integrate analytics.js - Remove invalid sourcemap
UNOMI-187 Integrate analytics.js - Remove invalid sourcemap Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/b5c5893e Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/b5c5893e Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/b5c5893e Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: b5c5893e393167f19efbd65f4aaed344b1e5f22e Parents: 5bcb4c1 Author: Serge Huber Authored: Tue Nov 20 23:45:18 2018 +0100 Committer: Serge Huber Committed: Tue Nov 20 23:45:18 2018 +0100 -- extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map | 1 - 1 file changed, 1 deletion(-) --
[12/50] [abbrv] incubator-unomi git commit: UNOMI-187 fix referrer
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-OskLnChnjf1GfnYZH3sdBjZzA08= dependencies: utf8-encode "1" "@segment/canonical@^1.0.0": version "1.0.0" resolved
[15/50] [abbrv] 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/UNOMI-180-CXS-GRAPHQLAPI 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
[19/50] [abbrv] incubator-unomi git commit: UNOMI-208 Improve documentation flow - Add generation of manual archives
UNOMI-208 Improve documentation flow - Add generation of manual archives Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/f502839b Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/f502839b Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/f502839b Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: f502839ba295c6b80254def597ed9e55ecaa7e89 Parents: cfe3158 Author: Serge Huber Authored: Mon Nov 5 15:13:56 2018 +0100 Committer: Serge Huber Committed: Mon Nov 5 15:13:56 2018 +0100 -- generate-site-and-upload.sh | 8 +++- generate-site.sh| 8 +++- manual/pom.xml | 17 - 3 files changed, 26 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f502839b/generate-site-and-upload.sh -- diff --git a/generate-site-and-upload.sh b/generate-site-and-upload.sh index d8dc0c5..87338e8 100755 --- a/generate-site-and-upload.sh +++ b/generate-site-and-upload.sh @@ -25,6 +25,12 @@ fi echo Generating documentation... mvn clean cd manual +mvn -Phtml -Ddoc.source=src/archives/1.1/asciidoc -Ddoc.output.html=target/generated-html/1_1_x +mvn -Ppdf -Ddoc.source=src/archives/1.1/asciidoc -Ddoc.output.pdf=target/generated-pdf/1_1_x +mvn -Phtml -Ddoc.source=src/archives/1.2/asciidoc -Ddoc.output.html=target/generated-html/1_2_x +mvn -Ppdf -Ddoc.source=src/archives/1.2/asciidoc -Ddoc.output.pdf=target/generated-pdf/1_2_x +mvn -Phtml -Ddoc.source=src/archives/1.3/asciidoc -Ddoc.output.html=target/generated-html/1_3_x +mvn -Ppdf -Ddoc.source=src/archives/1.3/asciidoc -Ddoc.output.pdf=target/generated-pdf/1_3_x mvn -Phtml mvn -Ppdf cd .. @@ -36,7 +42,7 @@ cd .. mkdir target/staging/unomi-api mkdir target/staging/manual cp -R target/site/apidocs target/staging/unomi-api -cp -R manual/target/generated-html/latest target/staging/manual +cp -Rf manual/target/generated-html/* target/staging/manual echo Committing documentation to Apache SVN... mvn scm-publish:publish-scm -Dscmpublish.pubScmUrl=scm:svn:https://svn.apache.org/repos/asf/incubator/unomi/website/manual -Dscmpublish.content=target/staging/manual -Dusername=$1 -Dpassword=$2 mvn scm-publish:publish-scm -Dscmpublish.pubScmUrl=scm:svn:https://svn.apache.org/repos/asf/incubator/unomi/website/unomi-api -Dscmpublish.content=target/staging/unomi-api -Dusername=$1 -Dpassword=$2 http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f502839b/generate-site.sh -- diff --git a/generate-site.sh b/generate-site.sh index 10b23f8..35aee66 100755 --- a/generate-site.sh +++ b/generate-site.sh @@ -20,6 +20,12 @@ echo Generating documentation... mvn clean cd manual +mvn -Phtml -Ddoc.source=src/archives/1.1/asciidoc -Ddoc.output.html=target/generated-html/1_1_x +mvn -Ppdf -Ddoc.source=src/archives/1.1/asciidoc -Ddoc.output.pdf=target/generated-pdf/1_1_x +mvn -Phtml -Ddoc.source=src/archives/1.2/asciidoc -Ddoc.output.html=target/generated-html/1_2_x +mvn -Ppdf -Ddoc.source=src/archives/1.2/asciidoc -Ddoc.output.pdf=target/generated-pdf/1_2_x +mvn -Phtml -Ddoc.source=src/archives/1.3/asciidoc -Ddoc.output.html=target/generated-html/1_3_x +mvn -Ppdf -Ddoc.source=src/archives/1.3/asciidoc -Ddoc.output.pdf=target/generated-pdf/1_3_x mvn -Phtml mvn -Ppdf cd .. @@ -31,5 +37,5 @@ cd .. mkdir target/staging/unomi-api mkdir target/staging/manual cp -R target/site/apidocs target/staging/unomi-api -cp -R manual/target/generated-html/latest target/staging/manual +cp -Rf manual/target/generated-html/* target/staging/manual echo Documentation generation completed! \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f502839b/manual/pom.xml -- diff --git a/manual/pom.xml b/manual/pom.xml index 6403a5c..bf1c47f 100644 --- a/manual/pom.xml +++ b/manual/pom.xml @@ -30,6 +30,13 @@ Apache Unomi :: Manual bundle + +src/main/asciidoc +target/generated-html/latest +target/generated-pdf/latest + + + html @@ -60,11 +67,11 @@ - src/main/asciidoc - target/generated-html/latest +${doc.source} + ${doc.output.html} true true -src/main/asciidoc/images +${doc.source}/images
[1/2] incubator-unomi git commit: UNOMI-187 Integrate analytics.js - Remove invalid sourcemap
Repository: incubator-unomi Updated Branches: refs/heads/master 5bcb4c1bc -> b5c5893e3 http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/b5c5893e/extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map -- diff --git a/extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map b/extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map deleted file mode 100644 index 3d0b6ac..000 --- a/extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["dist/unomi-tracker.js"],"names":["f","exports","module","define","amd","g","window","global","self","this","unomiTracker","r","e","n","t","o","i","c","require","u","a","Error","code","p","call","length","1","arity","objToString","Object","prototype","toString","isFunction","val","isNumber","type","after","fn","TypeError","callCount","apply","arguments","@ndhoule/arity","2","createParams","args","push","createArityWrapper","paramNames","join","wrapperBody","concat","Function","arityWrapperCache","arg1","arg2","arg3","arg4","arg5","func","Math","max","3","clone","obj","copy","key","hasOwnProperty","Array","l","flags","multiline","ignoreCase","RegExp","source","Date","getTime","component-type","4","drop","rest","has","isObject","value","Boolean","isPlainObject","shallowCombiner","target","undefined","deepCombiner","defaultsDeep","defaultsWith","combiner","sources","defaults","deep","@ndhoule/drop","@ndhoule/rest","5","count","collection","toDrop","Number","resu ltsLength","results","6","keys","isArray","isArrayLike","arrayEach","iterator","array","baseEach","object","ks","each","@ndhoule/keys","7","every","predicate","result","@ndhoule/each","8","extend","dest","slice","9","foldl","accumulator","10","strIndexOf","String","indexOf","sameValueZero","value1","value2","includes","searchElement","found","11","hop","strCharAt","charAt","toStr","str","index","context","prop","isString","indexKeys","pred","len","objectKeys","12","map","13","existy","pick","props","14","15","Analytics","_options","Integrations","_integrations","_readied","_timeout","_user","user","log","debug","bindAll","on","settings","options","initialPageview","page","_parseQuery","location","search","_analytics","analytics","Alias","Emitter","Group","Identify","Page","Track","cookie","metrics","group","is","isMeta","memory","nextTick","normalize","bind","pageDefaults","prevent","querystring","store","use","plugin","addIntegration","Integration","name","init","initialize","opts" ,"integrations","All","clonedOpts","integration","add","load","integrationCount","ready","emit","failedInitializations","once","increment","method","integration_name","integrationName","initialized","setAnonymousId","id","anonymousId","identify","traits","msg","userId","_invoke","_callback","groupId","track","event","properties","plan","events","planIntegrationOptions","enabled","Segment.io","__default","_mergeInitializeAndPlanIntegrations","trackClick","trackLink","links","el","ev","href","getAttribute","getAttributeNS","trackSubmit","trackForm","forms","handler","submit","$","jQuery","Zepto","category","defs","overrides","empty","pageview","url","path","alias","to","from","previousId","timeout","enable","disable","localStorage","setTimeout","facade","invoke","shift","reset","logout","query","pickPrefix","prefix","sub","acc","substr","q","parse","ajs_uid","ajs_event","ajs_aid","planIntegrations","noConflict","./cookie","./group","./memory","./metrics","./normalize","./pageDefaults" ,"./store","./user","@ndhoule/after","@ndhoule/clone","@ndhoule/defaults","@ndhoule/foldl","@ndhoule/pick","@segment/is-meta","@segment/prevent-default","bind-all","component-emitter","component-event","component-querystring","next-tick","segmentio-facade","16","Cookie","json","topDomain","domain","maxage","set","get","remove","stringify","@segment/top-domain","component-cookie","json3","17","Entity","isodateTraverse","_storage","storage","_getId","_setId","ret","persist","_id","_getTraits","_setTraits","_traits","current","save","@ndhoule/extend","@segment/isodate-traverse","18","inherit","./entity","inherits","19","VERSION","version","../package.json","./analytics","20","Memory","21","Metrics","send","host","sampleRate","flushTimer","maxQueueSize","queue","setInterval","_flush","metric","tags","random","payload","series","headers","Content-Type","err","res","@segment/send-json","22","list","toLowerCase","lower","s","providers","toplevel","@ndhoule/includes","@ndhoule/map","23","ca
[2/2] incubator-unomi git commit: UNOMI-187 Integrate analytics.js - Remove invalid sourcemap
UNOMI-187 Integrate analytics.js - Remove invalid sourcemap Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/b5c5893e Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/b5c5893e Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/b5c5893e Branch: refs/heads/master Commit: b5c5893e393167f19efbd65f4aaed344b1e5f22e Parents: 5bcb4c1 Author: Serge Huber Authored: Tue Nov 20 23:45:18 2018 +0100 Committer: Serge Huber Committed: Tue Nov 20 23:45:18 2018 +0100 -- extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map | 1 - 1 file changed, 1 deletion(-) --
[4/4] incubator-unomi git commit: UNOMI-187 Integrate analytics.js - Add sourcemaps - Add support for tags, categories and interests
UNOMI-187 Integrate analytics.js - Add sourcemaps - Add support for tags, categories and interests Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/5bcb4c1b Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/5bcb4c1b Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/5bcb4c1b Branch: refs/heads/master Commit: 5bcb4c1bcebbb55ac0e029dd9515db32c584b909 Parents: 6833975 Author: Serge Huber Authored: Tue Nov 20 23:43:50 2018 +0100 Committer: Serge Huber Committed: Tue Nov 20 23:43:50 2018 +0100 -- .../javascript/dist/unomi-tracker.js| 8 ++- .../javascript/dist/unomi-tracker.min.js| 2 +- .../web-tracker/javascript/snippet.min.js | 3 +- .../analytics.js-integration-apache-unomi.js| 4 +- .../web-tracker/wab/src/main/webapp/index.html | 24 +++ .../src/main/asciidoc/installing-tracker.adoc | 73 +++- pom.xml | 1 + 7 files changed, 108 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/5bcb4c1b/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 7f45ec3..707632e 100644 --- a/extensions/web-tracker/javascript/dist/unomi-tracker.js +++ b/extensions/web-tracker/javascript/dist/unomi-tracker.js @@ -11856,7 +11856,7 @@ module.exports = uuid; },{"./rng":94}],96:[function(require,module,exports){ module.exports={ "name": "unomi-analytics", - "version": "1.0.3", + "version": "1.0.4", "description": "The Apache Unomi analytics.js integration.", "main": "dist/unomi-tracker.js", "keywords": [ @@ -11871,7 +11871,7 @@ module.exports={ "browserify": "browserify src/index.js -p [ browserify-header --file src/license.js ] -s unomiTracker -o dist/unomi-tracker.js", "replace": "replace-in-file 'analytics.require = require' '//analytics.require = require' dist/unomi-tracker.js", "minify": "uglifyjs -c -m --comments '/@license/' -o dist/unomi-tracker.min.js -- dist/unomi-tracker.js", -"snippet:minify": "uglifyjs -c -m -o snippet.min.js -- snippet.js", +"snippet:minify": "uglifyjs -c -m -o snippet.min.js --source-map snippet.min.js.map -- snippet.js", "clean": "rimraf *.log dist/unomi-tracker.js dist/unomi-tracker.min.js", "clean:all": "yarn clean && rimraf node_modules" }, @@ -11997,7 +11997,7 @@ Unomi.prototype.loaded = function() { * @param {Page} page */ Unomi.prototype.onpage = function(page) { -var unomiPage = { pageInfo:{} }; +var unomiPage = { }; this.fillPageData(unomiPage, page.json().properties); this.collectEvent(this.buildEvent('view', this.buildPage(unomiPage), this.buildSource(this.options.scope, 'site'))); @@ -12006,6 +12006,8 @@ Unomi.prototype.onpage = function(page) { Unomi.prototype.fillPageData = function(unomiPage, props) { unomiPage.attributes = []; unomiPage.consentTypes = []; +unomiPage.interests = props.interests || {}; +unomiPage.pageInfo = unomiPage.pageInfo || props.pageInfo || {}; unomiPage.pageInfo.pageName = unomiPage.pageInfo.pageName || props.title; unomiPage.pageInfo.pageID = unomiPage.pageInfo.pageID || props.path; unomiPage.pageInfo.pagePath = unomiPage.pageInfo.pagePath || props.path; http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/5bcb4c1b/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 c3993ec..75fe41b 100644 --- a/extensions/web-tracker/javascript/dist/unomi-tracker.min.js +++ b/extensions/web-tracker/javascript/dist/unomi-tracker.min.js @@ -25,4 +25,4 @@ return this.prototype.globals.push(t),this},n.assumesPageview=function(){return * @license MIT */ var r,o=Object.prototype,i=o.hasOwnProperty,a=o.toString;"function"==typeof Symbol&&(r=Symbol.prototype.valueOf);var s=function(t){return t!==t},c={boolean:1,number:1,string:1,undefined:1},u=/^([A-Za-z0-9+\/]{4})*([A-Za-z0-9+\/]{4}|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{2}==)$/,p=/^[A-Fa-f0-9]+$/,l={};l.a=l.type=function(t,e){return typeof t===e},l.defined=function(t){return void 0!==t},l.empty=function(t){var e,n=a.call(t);if("[object Array]"===n||"[object Arguments]"===n||"[object String]"===n)return 0===t.length;if("[object Object]"===n){for(e in t)if(i.call(t,e))return!1;return!0}return!t},l.equal=function(t,e){if(t===e)return!0;var
[2/4] incubator-unomi git commit: v1.0.5
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/6833975e/extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map -- diff --git a/extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map b/extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map new file mode 100644 index 000..3d0b6ac --- /dev/null +++ b/extensions/web-tracker/javascript/dist/unomi-tracker.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["dist/unomi-tracker.js"],"names":["f","exports","module","define","amd","g","window","global","self","this","unomiTracker","r","e","n","t","o","i","c","require","u","a","Error","code","p","call","length","1","arity","objToString","Object","prototype","toString","isFunction","val","isNumber","type","after","fn","TypeError","callCount","apply","arguments","@ndhoule/arity","2","createParams","args","push","createArityWrapper","paramNames","join","wrapperBody","concat","Function","arityWrapperCache","arg1","arg2","arg3","arg4","arg5","func","Math","max","3","clone","obj","copy","key","hasOwnProperty","Array","l","flags","multiline","ignoreCase","RegExp","source","Date","getTime","component-type","4","drop","rest","has","isObject","value","Boolean","isPlainObject","shallowCombiner","target","undefined","deepCombiner","defaultsDeep","defaultsWith","combiner","sources","defaults","deep","@ndhoule/drop","@ndhoule/rest","5","count","collection","toDrop","Number","resu ltsLength","results","6","keys","isArray","isArrayLike","arrayEach","iterator","array","baseEach","object","ks","each","@ndhoule/keys","7","every","predicate","result","@ndhoule/each","8","extend","dest","slice","9","foldl","accumulator","10","strIndexOf","String","indexOf","sameValueZero","value1","value2","includes","searchElement","found","11","hop","strCharAt","charAt","toStr","str","index","context","prop","isString","indexKeys","pred","len","objectKeys","12","map","13","existy","pick","props","14","15","Analytics","_options","Integrations","_integrations","_readied","_timeout","_user","user","log","debug","bindAll","on","settings","options","initialPageview","page","_parseQuery","location","search","_analytics","analytics","Alias","Emitter","Group","Identify","Page","Track","cookie","metrics","group","is","isMeta","memory","nextTick","normalize","bind","pageDefaults","prevent","querystring","store","use","plugin","addIntegration","Integration","name","init","initialize","opts" ,"integrations","All","clonedOpts","integration","add","load","integrationCount","ready","emit","failedInitializations","once","increment","method","integration_name","integrationName","initialized","setAnonymousId","id","anonymousId","identify","traits","msg","userId","_invoke","_callback","groupId","track","event","properties","plan","events","planIntegrationOptions","enabled","Segment.io","__default","_mergeInitializeAndPlanIntegrations","trackClick","trackLink","links","el","ev","href","getAttribute","getAttributeNS","trackSubmit","trackForm","forms","handler","submit","$","jQuery","Zepto","category","defs","overrides","empty","pageview","url","path","alias","to","from","previousId","timeout","enable","disable","localStorage","setTimeout","facade","invoke","shift","reset","logout","query","pickPrefix","prefix","sub","acc","substr","q","parse","ajs_uid","ajs_event","ajs_aid","planIntegrations","noConflict","./cookie","./group","./memory","./metrics","./normalize","./pageDefaults" ,"./store","./user","@ndhoule/after","@ndhoule/clone","@ndhoule/defaults","@ndhoule/foldl","@ndhoule/pick","@segment/is-meta","@segment/prevent-default","bind-all","component-emitter","component-event","component-querystring","next-tick","segmentio-facade","16","Cookie","json","topDomain","domain","maxage","set","get","remove","stringify","@segment/top-domain","component-cookie","json3","17","Entity","isodateTraverse","_storage","storage","_getId","_setId","ret","persist","_id","_getTraits","_setTraits","_traits","current","save","@ndhoule/extend","@segment/isodate-traverse","18","inherit","./entity","inherits","19","VERSION","version","../package.json","./analytics","20","Memory","21","Metrics","send","host","sampleRate","flushTimer","maxQueueSize","queue","setInterval","_flush","metric","tags","random","payload","series","headers","Content-Type","err","res","@segment/send-json","22","list","toLowerCase","lower","s","providers","toplevel","@ndhoule/includes","@ndhoule/map","23","ca
[3/4] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Rename CXS to CDP
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cfc12dad/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSEventBuilders.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSEventBuilders.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSEventBuilders.java deleted file mode 100644 index 8c616d4..000 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSEventBuilders.java +++ /dev/null @@ -1,465 +0,0 @@ -/* - * 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.graphql.builders; - -import graphql.annotations.processor.GraphQLAnnotationsComponent; -import graphql.annotations.processor.ProcessingElementsContainer; -import graphql.schema.*; -import org.apache.unomi.graphql.propertytypes.*; -import org.apache.unomi.graphql.types.input.CXSEventInput; -import org.apache.unomi.graphql.types.input.CXSEventOccurrenceFilterInput; -import org.apache.unomi.graphql.types.output.CXSEvent; -import org.apache.unomi.graphql.types.output.CXSEventProperties; -import org.apache.unomi.graphql.types.output.CXSEventType; -import org.apache.unomi.graphql.types.output.PageInfo; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import static graphql.Scalars.*; -import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition; -import static graphql.schema.GraphQLInputObjectField.newInputObjectField; -import static graphql.schema.GraphQLInputObjectType.newInputObject; -import static graphql.schema.GraphQLObjectType.newObject; - -public class CXSEventBuilders implements CXSBuilder { - -private GraphQLAnnotationsComponent annotationsComponent; -private ProcessingElementsContainer container; -private Map eventTypes; -private Map typeRegistry; - -public CXSEventBuilders(GraphQLAnnotationsComponent annotationsComponent, -ProcessingElementsContainer container, -Map eventTypes) { -this.annotationsComponent = annotationsComponent; -this.container = container; -this.eventTypes = eventTypes; -this.typeRegistry = container.getTypeRegistry(); -} - -@Override -public void updateTypes() { -Map typeRegistry = container.getTypeRegistry(); -typeRegistry.put("CXS_EventInput", buildCXSEventInputType()); -typeRegistry.put("CXS_EventOccurrenceFilterInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSEventOccurrenceFilterInput.class, container)); -typeRegistry.put("CXS_EventPropertiesFilterInput", buildCXSEventPropertiesFilterInput()); -typeRegistry.put("CXS_EventFilterInput", buildCXSEventFilterInputType()); -typeRegistry.put("CXS_EventProperties", buildCXSEventPropertiesOutputType()); -typeRegistry.put("CXS_Event", buildCXSEventOutputType()); -typeRegistry.put("CXS_EventEdge", buildCXSEventEdgeOutputType()); -typeRegistry.put("CXS_EventConnection", buildCXSEventConnectionOutputType()); -} - -private GraphQLOutputType buildCXSEventEdgeOutputType() { -return newObject() -.name("CXS_EventEdge") -.description("The Relay edge type for the CXS_Event output type") -.field(newFieldDefinition() -.name("node") -.type((GraphQLOutputType) typeRegistry.get("CXS_Event")) -) -.field(newFieldDefinition() -.name("cursor") -.type(GraphQLString) -) -.build(); -} - -private GraphQLOutputType buildCXSEventConnectionOutputType() { -return newObject() -.name("CXS_EventConnection") -.description("The Relay connection type for the CXS_Event output type") -.field(newFieldDefinition() -.name("edges") -.type(new GraphQLList(typeRegistry.get("CXS_EventEdge"))) -) -.field(newFieldDefinition() -
[1/4] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Rename CXS to CDP
Repository: incubator-unomi Updated Branches: refs/heads/UNOMI-180-CXS-GRAPHQLAPI 839a5d949 -> cfc12dad0 http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cfc12dad/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventType.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventType.java new file mode 100644 index 000..e59895b --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventType.java @@ -0,0 +1,63 @@ +/* + * 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.graphql.types.output; + +import graphql.annotations.annotationTypes.GraphQLField; +import graphql.annotations.annotationTypes.GraphQLName; +import org.apache.unomi.graphql.propertytypes.CDPPropertyType; + +import java.util.ArrayList; +import java.util.List; + +@GraphQLName("CDP_EventType") +public class CDPEventType { + +private String id; +private String scope; +private String typeName; +private List properties = new ArrayList<>(); + +public CDPEventType(@GraphQLName("id") String id, +@GraphQLName("scope") String scope, +@GraphQLName("typeName") String typeName, +@GraphQLName("properties") List properties) { +this.id = id; +this.scope = scope; +this.typeName = typeName; +this.properties = properties; +} + +@GraphQLField +public String getId() { +return id; +} + +@GraphQLField +public String getScope() { +return scope; +} + +@GraphQLField +public String getTypeName() { +return typeName; +} + +@GraphQLField +public List getProperties() { +return properties; +} +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cfc12dad/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoDistanceUnit.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoDistanceUnit.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoDistanceUnit.java new file mode 100644 index 000..f046e62 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoDistanceUnit.java @@ -0,0 +1,26 @@ +/* + * 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.graphql.types.output; + +import graphql.annotations.annotationTypes.GraphQLName; + +@GraphQLName("CDP_GeoDistanceUnit") +public enum CDPGeoDistanceUnit { +METERS, +KILOMETERS, +MILES +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cfc12dad/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoPoint.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoPoint.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoPoint.java new file mode 100644 index 000..58cc2b8 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoPoint.java @@ -0,0 +1,31 @@ +/* + * Licensed to the
[4/4] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Rename CXS to CDP
UNOMI-180 Implement CXS GraphQL API - Rename CXS to CDP Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/cfc12dad Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/cfc12dad Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/cfc12dad Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: cfc12dad0de9e3fafacead1ac05396661c25917a Parents: 839a5d9 Author: Serge Huber Authored: Mon Nov 19 18:17:11 2018 +0100 Committer: Serge Huber Committed: Mon Nov 19 18:17:11 2018 +0100 -- graphql/cxs-impl/pom.xml| 6 +- .../unomi/graphql/CDPGraphQLProvider.java | 30 ++ .../org/apache/unomi/graphql/CDPMutation.java | 128 + .../graphql/CDPProfilePropertiesFilter.java | 35 ++ .../unomi/graphql/CDPProviderManager.java | 27 ++ .../java/org/apache/unomi/graphql/CDPQuery.java | 99 .../unomi/graphql/CXSGraphQLProvider.java | 30 -- .../org/apache/unomi/graphql/CXSMutation.java | 127 - .../graphql/CXSProfilePropertiesFilter.java | 35 -- .../unomi/graphql/CXSProviderManager.java | 27 -- .../java/org/apache/unomi/graphql/CXSQuery.java | 99 .../unomi/graphql/builders/CDPBuilder.java | 23 + .../graphql/builders/CDPBuildersUtils.java | 52 +++ .../graphql/builders/CDPEventBuilders.java | 465 +++ .../unomi/graphql/builders/CXSBuilder.java | 23 - .../graphql/builders/CXSBuildersUtils.java | 52 --- .../graphql/builders/CXSEventBuilders.java | 465 --- .../internal/CDPGraphQLProviderImpl.java| 245 ++ .../internal/CDPProviderManagerImpl.java| 111 + .../internal/CXSGraphQLProviderImpl.java| 245 -- .../internal/CXSProviderManagerImpl.java| 111 - .../propertytypes/CDPBooleanPropertyType.java | 51 ++ .../propertytypes/CDPDatePropertyType.java | 45 ++ .../propertytypes/CDPFloatPropertyType.java | 61 +++ .../propertytypes/CDPGeoPointPropertyType.java | 45 ++ .../CDPIdentifierPropertyType.java | 53 +++ .../propertytypes/CDPIntPropertyType.java | 61 +++ .../graphql/propertytypes/CDPPropertyType.java | 95 .../propertytypes/CDPSetPropertyType.java | 45 ++ .../propertytypes/CDPStringPropertyType.java| 54 +++ .../propertytypes/CXSBooleanPropertyType.java | 51 -- .../propertytypes/CXSDatePropertyType.java | 45 -- .../propertytypes/CXSFloatPropertyType.java | 61 --- .../propertytypes/CXSGeoPointPropertyType.java | 45 -- .../CXSIdentifierPropertyType.java | 53 --- .../propertytypes/CXSIntPropertyType.java | 61 --- .../graphql/propertytypes/CXSPropertyType.java | 95 .../propertytypes/CXSSetPropertyType.java | 45 -- .../propertytypes/CXSStringPropertyType.java| 54 --- .../graphql/types/input/CDPDateFilter.java | 32 ++ .../graphql/types/input/CDPEventFilter.java | 35 ++ .../graphql/types/input/CDPEventInput.java | 69 +++ .../input/CDPEventOccurrenceFilterInput.java| 35 ++ .../graphql/types/input/CDPEventTypeInput.java | 62 +++ .../types/input/CDPGeoDistanceInput.java| 32 ++ .../graphql/types/input/CDPGeoPointInput.java | 28 ++ .../graphql/types/input/CDPOrderByInput.java| 31 ++ .../types/input/CDPPropertyTypeInput.java | 76 +++ .../types/input/CDPSegmentFilterInput.java | 51 ++ .../types/input/CDPSetPropertyTypeInput.java| 46 ++ .../graphql/types/input/CXSDateFilter.java | 32 -- .../graphql/types/input/CXSEventFilter.java | 35 -- .../graphql/types/input/CXSEventInput.java | 69 --- .../input/CXSEventOccurrenceFilterInput.java| 35 -- .../graphql/types/input/CXSEventTypeInput.java | 62 --- .../types/input/CXSGeoDistanceInput.java| 32 -- .../graphql/types/input/CXSGeoPointInput.java | 28 -- .../graphql/types/input/CXSOrderByInput.java| 31 -- .../types/input/CXSPropertyTypeInput.java | 76 --- .../types/input/CXSSegmentFilterInput.java | 51 -- .../types/input/CXSSetPropertyTypeInput.java| 45 -- .../unomi/graphql/types/output/CDPEvent.java| 67 +++ .../types/output/CDPEventConnection.java| 32 ++ .../graphql/types/output/CDPEventEdge.java | 30 ++ .../graphql/types/output/CDPEventFilter.java| 32 ++ .../types/output/CDPEventOccurrenceFilter.java | 36 ++ .../types/output/CDPEventProperties.java| 35 ++ .../types/output/CDPEventPropertiesFilter.java | 23 + .../graphql/types/output/CDPEventType.java | 63 +++ .../types/output/CDPGeoDistanceUnit.java| 26 ++ .../unomi/graphql/types/output/CDPGeoPoint.java | 31 ++ .../unomi/graphql/types/output/CDPSegment.java | 32 ++
[1/2] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Modify the type generation to use "Input" suffix for input types instead of a prefix.
Repository: incubator-unomi Updated Branches: refs/heads/UNOMI-180-CXS-GRAPHQLAPI 249dd1c75 -> 839a5d949 http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoPointInput.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoPointInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoPointInput.java new file mode 100644 index 000..772abb8 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoPointInput.java @@ -0,0 +1,28 @@ +/* + * 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.graphql.types.input; + +import graphql.annotations.annotationTypes.GraphQLField; +import graphql.annotations.annotationTypes.GraphQLName; + +@GraphQLName("CXS_GeoPoint") +public class CXSGeoPointInput { +@GraphQLField +public Double longitude; +@GraphQLField +public Double latitude; +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSOrderByInput.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSOrderByInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSOrderByInput.java new file mode 100644 index 000..3ee5e1c --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSOrderByInput.java @@ -0,0 +1,31 @@ +/* + * 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.graphql.types.input; + +import graphql.annotations.annotationTypes.GraphQLField; +import graphql.annotations.annotationTypes.GraphQLName; +import org.apache.unomi.graphql.types.output.CXSSortOrder; + +@GraphQLName("CXS_OrderBy") +public class CXSOrderByInput { + +@GraphQLField +public String fieldName; + +@GraphQLField +public CXSSortOrder sortOrder; +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/839a5d94/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSPropertyTypeInput.java -- diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSPropertyTypeInput.java new file mode 100644 index 000..9917ca3 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSPropertyTypeInput.java @@ -0,0 +1,76 @@ +/* + * 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. + *
[2/2] incubator-unomi git commit: UNOMI-180 Implement CXS GraphQL API - Modify the type generation to use "Input" suffix for input types instead of a prefix.
UNOMI-180 Implement CXS GraphQL API - Modify the type generation to use "Input" suffix for input types instead of a prefix. Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/839a5d94 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/839a5d94 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/839a5d94 Branch: refs/heads/UNOMI-180-CXS-GRAPHQLAPI Commit: 839a5d94980f00211041e3d43a444dfae1a53331 Parents: 249dd1c Author: Serge Huber Authored: Sun Nov 18 23:50:09 2018 +0100 Committer: Serge Huber Committed: Sun Nov 18 23:50:09 2018 +0100 -- graphql/cxs-impl/pom.xml| 6 ++ .../unomi/graphql/CXSDateFilterInput.java | 32 - .../java/org/apache/unomi/graphql/CXSEvent.java | 67 - .../unomi/graphql/CXSEventConnection.java | 32 - .../org/apache/unomi/graphql/CXSEventEdge.java | 30 .../apache/unomi/graphql/CXSEventFilter.java| 32 - .../unomi/graphql/CXSEventFilterInput.java | 35 - .../org/apache/unomi/graphql/CXSEventInput.java | 69 -- .../unomi/graphql/CXSEventOccurrenceFilter.java | 36 -- .../graphql/CXSEventOccurrenceFilterInput.java | 35 - .../unomi/graphql/CXSEventProperties.java | 35 - .../unomi/graphql/CXSEventPropertiesFilter.java | 23 -- .../org/apache/unomi/graphql/CXSEventType.java | 63 .../apache/unomi/graphql/CXSEventTypeInput.java | 62 .../unomi/graphql/CXSGeoDistanceInput.java | 30 .../unomi/graphql/CXSGeoDistanceUnit.java | 26 --- .../org/apache/unomi/graphql/CXSGeoPoint.java | 31 .../apache/unomi/graphql/CXSGeoPointInput.java | 28 .../unomi/graphql/CXSGraphQLProvider.java | 4 +- .../org/apache/unomi/graphql/CXSMutation.java | 22 +++--- .../apache/unomi/graphql/CXSOrderByInput.java | 30 .../unomi/graphql/CXSPropertyTypeInput.java | 76 .../unomi/graphql/CXSProviderManager.java | 4 ++ .../java/org/apache/unomi/graphql/CXSQuery.java | 45 +++- .../org/apache/unomi/graphql/CXSSegment.java| 32 - .../unomi/graphql/CXSSegmentCondition.java | 32 - .../unomi/graphql/CXSSetPropertyTypeInput.java | 46 .../org/apache/unomi/graphql/CXSSortOrder.java | 26 --- .../java/org/apache/unomi/graphql/CXSView.java | 26 --- .../java/org/apache/unomi/graphql/PageInfo.java | 28 .../graphql/builders/CXSEventBuilders.java | 9 ++- .../internal/CXSGraphQLProviderImpl.java| 18 - .../internal/CXSProviderManagerImpl.java| 23 ++ .../propertytypes/CXSFloatPropertyType.java | 18 ++--- .../graphql/types/input/CXSDateFilter.java | 32 + .../graphql/types/input/CXSEventFilter.java | 35 + .../graphql/types/input/CXSEventInput.java | 69 ++ .../input/CXSEventOccurrenceFilterInput.java| 35 + .../graphql/types/input/CXSEventTypeInput.java | 62 .../types/input/CXSGeoDistanceInput.java| 32 + .../graphql/types/input/CXSGeoPointInput.java | 28 .../graphql/types/input/CXSOrderByInput.java| 31 .../types/input/CXSPropertyTypeInput.java | 76 .../types/input/CXSSegmentFilterInput.java | 51 + .../types/input/CXSSetPropertyTypeInput.java| 45 .../unomi/graphql/types/output/CXSEvent.java| 67 + .../types/output/CXSEventConnection.java| 32 + .../graphql/types/output/CXSEventEdge.java | 30 .../graphql/types/output/CXSEventFilter.java| 32 + .../types/output/CXSEventOccurrenceFilter.java | 36 ++ .../types/output/CXSEventProperties.java| 35 + .../types/output/CXSEventPropertiesFilter.java | 23 ++ .../graphql/types/output/CXSEventType.java | 63 .../types/output/CXSGeoDistanceUnit.java| 26 +++ .../unomi/graphql/types/output/CXSGeoPoint.java | 31 .../unomi/graphql/types/output/CXSSegment.java | 32 + .../types/output/CXSSegmentCondition.java | 33 + .../types/output/CXSSegmentConnection.java | 31 .../graphql/types/output/CXSSegmentEdge.java| 31 .../graphql/types/output/CXSSortOrder.java | 26 +++ .../unomi/graphql/types/output/CXSView.java | 26 +++ .../unomi/graphql/types/output/PageInfo.java| 28 graphql/karaf-feature/pom.xml | 19 +++-- graphql/pom.xml | 6 +- 64 files changed, 1219 insertions(+), 995 deletions(-)
incubator-unomi git commit: UNOMI-208 Improve documentation - Clarify salesforce setup procedure
Repository: incubator-unomi Updated Branches: refs/heads/master cb730a228 -> 45ed86e1b UNOMI-208 Improve documentation - Clarify salesforce setup procedure Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/45ed86e1 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/45ed86e1 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/45ed86e1 Branch: refs/heads/master Commit: 45ed86e1b2935fd07f95a4045e4e8e80d5438e7d Parents: cb730a2 Author: Serge Huber Authored: Thu Nov 15 19:55:52 2018 +0100 Committer: Serge Huber Committed: Thu Nov 15 19:55:52 2018 +0100 -- .../connectors/salesforce-connector.adoc| 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/45ed86e1/manual/src/main/asciidoc/connectors/salesforce-connector.adoc -- diff --git a/manual/src/main/asciidoc/connectors/salesforce-connector.adoc b/manual/src/main/asciidoc/connectors/salesforce-connector.adoc index d200082..50c0332 100644 --- a/manual/src/main/asciidoc/connectors/salesforce-connector.adoc +++ b/manual/src/main/asciidoc/connectors/salesforce-connector.adoc @@ -18,6 +18,8 @@ Apache Unomi profiles and Salesforce Leads. Getting started += Salesforce account setup + . Create a new developer account here: + [source] @@ -49,6 +51,8 @@ Consumer secret (click to see it) click on your user at the top right, select "Settings", the click on "Reset my security token". You will receive an email with the security token. += Apache Unomi setup + . You are now ready to configure the Apache Unomi Salesforce Connector. In the etc/org.apache.unomi.sfdc.cfg file change the following settings: + @@ -60,7 +64,12 @@ sfdc.user.securityToken=YOUR_USER_SECURITY_TOKEN sfdc.consumer.key=CONNECTED_APP_CONSUMER_KEY sfdc.consumer.secret=CONNECTED_APP_SECRET -+ + += Deployment from Maven repository + +In this procedure we assume you have access to a Maven repository that contains a compiled version of the Salesforce connector. +If this is not the case or you prefer to deploy using a KAR bundle, see the KAR deployment instructions instead. + . Connect to the Apache Unomi Karaf Shell using : + [source] @@ -75,7 +84,18 @@ ssh -p 8102 karaf@localhost (default password is karaf) feature:repo-add mvn:org.apache.unomi/unomi-salesforce-connectors-karaf-kar/${project.version}/xml/features feature:install unomi-salesforce-connectors-karaf-kar -+ + += Deployment using KAR bundle + +If you have a KAR bundle (for example after building from source in the `extensions/salesforce-connector/karaf-kar/target` directory), +you can follow these steps to install : + +. Ensure that Apache Karaf and Apache Unomi are started +. Execute the following command in karaf: `feature:install unomi-salesforce-connector-karaf-kar` +. The installation is done ! + += Testing the connector + . You can then test the connection to Salesforce by accessing the following URLs: + [source]
incubator-unomi git commit: UNOMI-208 Improve documentation - Add properties mapping to Salesforce connector documentation
Repository: incubator-unomi Updated Branches: refs/heads/master 3b808eed1 -> cb730a228 UNOMI-208 Improve documentation - Add properties mapping to Salesforce connector documentation Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/cb730a22 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/cb730a22 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/cb730a22 Branch: refs/heads/master Commit: cb730a228c6b8ac51c98875d5a432fcf68f1b798 Parents: 3b808ee Author: Serge Huber Authored: Thu Nov 15 18:27:52 2018 +0100 Committer: Serge Huber Committed: Thu Nov 15 18:27:52 2018 +0100 -- .../connectors/salesforce-connector.adoc| 23 +--- 1 file changed, 20 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cb730a22/manual/src/main/asciidoc/connectors/salesforce-connector.adoc -- diff --git a/manual/src/main/asciidoc/connectors/salesforce-connector.adoc b/manual/src/main/asciidoc/connectors/salesforce-connector.adoc index e3ff97b..d200082 100644 --- a/manual/src/main/asciidoc/connectors/salesforce-connector.adoc +++ b/manual/src/main/asciidoc/connectors/salesforce-connector.adoc @@ -90,9 +90,26 @@ Salesforce REST API to retrieve the limits of the Salesforce API. + Both URLs are password protected by the Apache Unomi (Karaf) password. You can find this user and password information in the etc/users.properties file. -+ -. You can now use the connectors's defined actions in rules to push or pull data to/from the Salesforce CRM. You can -find more information about rules in the <> and the link:getting-started.html[Getting Started] pages. + +You can now use the connectors's defined actions in rules to push or pull data to/from the Salesforce CRM. You can +find more information about rules in the <<_concepts,Concepts>> and the <<_getting_started_with_unomi,Getting Started>> pages. + + Properties + +To define how Salesforce attributes will be mapped to Marketing Factory profile properties, edit the following entry using the pattern below : + +[source] + +sfdc.fields.mappings=myMarketingFactoryProperty1<=>mySFDCAttribute1,myMarketingFactoryProperty2<=>mySFDCAttribute2 + + +Please note that Salesforce needs the company and the last name to be set, otherwise the lead won't be created. +An identifier needs to be set as well. The identifier will be used to map the Marketing Factory profile to the Salesforce lead. By default, the email is set as the identifier, meaning that if a lead in Salesforce and a profile in Marketing Factory have the same email, they'll be considered as the same person. + +[source] + +sfdc.fields.mappings.identifier=email<=>Email + Hot-deploying updates to the Salesforce connector (for developers)
incubator-unomi git commit: UNOMI-208 Improve documentation - Backport doc improvements to 1.3.x documentation
Repository: incubator-unomi Updated Branches: refs/heads/master 3ade4d26a -> 3b808eed1 UNOMI-208 Improve documentation - Backport doc improvements to 1.3.x documentation Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/3b808eed Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/3b808eed Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/3b808eed Branch: refs/heads/master Commit: 3b808eed14863c1e1f0c5fd751d19349717722af Parents: 3ade4d2 Author: Serge Huber Authored: Thu Nov 15 13:19:18 2018 +0100 Committer: Serge Huber Committed: Thu Nov 15 13:19:18 2018 +0100 -- .../1.3/asciidoc/building-and-deploying.adoc| 39 ++- .../archives/1.3/asciidoc/configuration.adoc| 14 ++- .../1.3/asciidoc/connectors/connectors.adoc | 7 +- .../connectors/salesforce-connector.adoc| 110 +++ .../1.3/asciidoc/custom-extensions.adoc | 4 +- .../archives/1.3/asciidoc/getting-started.adoc | 11 +- manual/src/archives/1.3/asciidoc/index.adoc | 29 +++-- .../1.3/asciidoc/samples/login-sample.adoc | 12 +- .../archives/1.3/asciidoc/samples/samples.adoc | 4 +- .../1.3/asciidoc/samples/twitter-sample.adoc| 2 +- .../asciidoc/samples/weather-update-sample.adoc | 2 +- 11 files changed, 94 insertions(+), 140 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/3b808eed/manual/src/archives/1.3/asciidoc/building-and-deploying.adoc -- diff --git a/manual/src/archives/1.3/asciidoc/building-and-deploying.adoc b/manual/src/archives/1.3/asciidoc/building-and-deploying.adoc index b285779..558ddd2 100644 --- a/manual/src/archives/1.3/asciidoc/building-and-deploying.adoc +++ b/manual/src/archives/1.3/asciidoc/building-and-deploying.adoc @@ -16,59 +16,54 @@ Initial Setup -1) Install J2SE 8.0 SDK (or later), which can be downloaded from +. Install J2SE 8.0 SDK (or later), which can be downloaded from http://www.oracle.com/technetwork/java/javase/downloads/index.html[http://www.oracle.com/technetwork/java/javase/downloads/index.html] -2) Make sure that your JAVA_HOME environment variable is set to the newly installed +. Make sure that your JAVA_HOME environment variable is set to the newly installed JDK location, and that your PATH includes %JAVA_HOME%\bin (windows) or $JAVA_HOME$/bin (unix). -3) Install Maven 3.0.3 (or later), which can be downloaded from +. Install Maven 3.0.3 (or later), which can be downloaded from http://maven.apache.org/download.html[http://maven.apache.org/download.html]. Make sure that your PATH includes the MVN_HOME/bin directory. Building -1) Change to the top level directory of Apache Unomi source distribution. -2) Run - +. Get the code: `git clone https://git-wip-us.apache.org/repos/asf/incubator-unomi.git` +. Change to the top level directory of Apache Unomi source distribution. +. Run ++ [source] $> mvn clean install - ++ This will compile Apache Unomi and run all of the tests in the Apache Unomi source distribution. Alternatively, you can run - ++ [source] $> mvn -P \!integration-tests,\!performance-tests clean install - ++ This will compile Apache Unomi without running the tests and takes less time to build. -3) The distributions will be available under "package/target" directory. +. The distributions will be available under "package/target" directory. Installing an ElasticSearch server Starting with version 1.2, Apache Unomi no longer embeds an ElasticSearch server as this is no longer supported by the developers of ElasticSearch. Therefore you will need to install a standalone ElasticSearch using the following steps: -. - Download an ElasticSearch version. Here's the version you will need depending on your version of Apache Unomi. Apache Unomi = 1.2 : https://www.elastic.co/downloads/past-releases/elasticsearch-5-1-2[https://www.elastic.co/downloads/past-releases/elasticsearch-5-1-2] Apache Unomi = 1.3 : https://www.elastic.co/downloads/past-releases/elasticsearch-5-6-3[https://www.elastic.co/downloads/past-releases/elasticsearch-5-6-3] -. - Uncompress the downloaded package into a directory -. - In the config/elasticsearch.yml file, uncomment and modify the following line : [source] @@ -76,8 +71,6 @@ In the config/elasticsearch.yml file, uncomment and modify the following line : cluster.name: contextElasticSearch -. - Launch the server using [source] @@ -86,8 +79,6 @@ bin/elasticsearch (Mac, Linux) bin\elasticsearch.bat (Windows) -. - Check that the ElasticSearch is up and running by accessing the following URL
incubator-unomi git commit: UNOMI-208 Improve documentation - Fix cross-references - Fix numbering in certain sections - Add documentation on port number change
Repository: incubator-unomi Updated Branches: refs/heads/master 23b556fe1 -> 3ade4d26a UNOMI-208 Improve documentation - Fix cross-references - Fix numbering in certain sections - Add documentation on port number change Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/3ade4d26 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/3ade4d26 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/3ade4d26 Branch: refs/heads/master Commit: 3ade4d26a610e052e9e20261d1e6e0611bb5cb35 Parents: 23b556f Author: Serge Huber Authored: Thu Nov 15 13:01:23 2018 +0100 Committer: Serge Huber Committed: Thu Nov 15 13:01:23 2018 +0100 -- manual/pom.xml | 56 +- .../main/asciidoc/building-and-deploying.adoc | 22 ++-- manual/src/main/asciidoc/configuration.adoc | 10 ++ .../main/asciidoc/connectors/connectors.adoc| 7 +- .../connectors/mailchimp-connector.adoc | 2 +- .../connectors/salesforce-connector.adoc| 110 +++ manual/src/main/asciidoc/custom-extensions.adoc | 4 +- manual/src/main/asciidoc/getting-started.adoc | 6 +- .../src/main/asciidoc/samples/login-sample.adoc | 2 +- manual/src/main/asciidoc/samples/samples.adoc | 4 +- .../main/asciidoc/samples/twitter-sample.adoc | 2 +- .../asciidoc/samples/weather-update-sample.adoc | 2 +- 12 files changed, 106 insertions(+), 121 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/3ade4d26/manual/pom.xml -- diff --git a/manual/pom.xml b/manual/pom.xml index bf1c47f..71bc125 100644 --- a/manual/pom.xml +++ b/manual/pom.xml @@ -46,7 +46,7 @@ org.asciidoctor asciidoctor-maven-plugin -1.5.6 +1.5.7.1 output-html @@ -55,6 +55,12 @@ process-asciidoc + index.adoc + ${doc.source} + ${doc.output.html} + true +true +${doc.source}/images html5 article @@ -67,11 +73,6 @@ -${doc.source} - ${doc.output.html} -true -true -${doc.source}/images @@ -86,7 +87,7 @@ org.asciidoctor asciidoctor-maven-plugin -1.5.6 +1.5.7.1 org.asciidoctor @@ -94,26 +95,6 @@ 1.5.0-alpha.16 - -${doc.source} - ${doc.output.pdf} -true -true -pdf - - ${project.version} - ${project.basedir}/src/theme -apache - ${project.basedir}/src/theme/fonts -images -font -true - - -- -true - - generate-pdf-doc @@ -121,6 +102,27 @@ process-asciidoc + + index.adoc + ${doc.source} + ${doc.output.pdf} + true +true +pdf +
incubator-unomi git commit: UNOMI-208 Improve documentation - Add documentation for SSH Shell commands.
Repository: incubator-unomi Updated Branches: refs/heads/master f502839ba -> 67657bdb1 UNOMI-208 Improve documentation - Add documentation for SSH Shell commands. Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/67657bdb Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/67657bdb Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/67657bdb Branch: refs/heads/master Commit: 67657bdb11d3381f1cea81565ee41bf8f5a248f8 Parents: f502839 Author: Serge Huber Authored: Mon Nov 5 18:23:09 2018 +0100 Committer: Serge Huber Committed: Mon Nov 5 18:23:09 2018 +0100 -- manual/src/main/asciidoc/index.adoc | 2 + manual/src/main/asciidoc/shell-commands.adoc | 138 ++ 2 files changed, 140 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/67657bdb/manual/src/main/asciidoc/index.adoc -- diff --git a/manual/src/main/asciidoc/index.adoc b/manual/src/main/asciidoc/index.adoc index bf29433..ea1d4a1 100644 --- a/manual/src/main/asciidoc/index.adoc +++ b/manual/src/main/asciidoc/index.adoc @@ -68,6 +68,8 @@ include::consent-api.adoc[] include::building-and-deploying.adoc[] +include::shell-commands.adoc[] + include::extending-plugins.adoc[] include::custom-extensions.adoc[] http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/67657bdb/manual/src/main/asciidoc/shell-commands.adoc -- diff --git a/manual/src/main/asciidoc/shell-commands.adoc b/manual/src/main/asciidoc/shell-commands.adoc new file mode 100644 index 000..e69e2bc --- /dev/null +++ b/manual/src/main/asciidoc/shell-commands.adoc @@ -0,0 +1,138 @@ +// +// 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 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. +// +=== SSH Shell Commands + +Apache Unomi provides its own Apache Karaf Shell commands to make it easy to control the application +lifecycle or perform queries or modifications on the internal state of the system. + +All Apache Unomi-specific commands are namespaced and use the `unomi:` namespace. You can use the Apache Karaf Shell's +autocompletion to list all the commands available. + + Using the shell + +You can connect to the Apache Karaf SSH Shell using the following command: + +ssh -p 8102 karaf@localhost + +The default username/password is karaf/karaf. You should change this as soon as possible by editing the `etc/users.properties` file. + +Once connected you can simply type in : + +unomi: + +And hit the key to see the list of all the available Apache Unomi commands. Note that some commands +are only available when the application is started. + +You can also use the `help` command on any command such as in the following example: + +``` +karaf@root()> help unomi:migrate +DESCRIPTION +unomi:migrate + +This will Migrate your date in ES to be compliant with current version + +SYNTAX +unomi:migrate [fromVersionWithoutSuffix] + +ARGUMENTS +fromVersionWithoutSuffix +Origin version without suffix/qualifier (e.g: 1.2.0) +(defaults to 1.2.0) +``` + Lifecycle commands + +The commands control the lifecycle of the Apache Unomi server and are used to migrate, start or stop the server. + +.Table Lifecycle commands +|=== +|Command|Arguments|Description + +|migrate +|fromVersion +|This command must be used only when the Apache Unomi application is NOT STARTED. It will perform migration of the data stored in ElasticSearch using the argument fromVersion as a starting point. + +|stop +|n/a +|Shutsdown the Apache Unomi application + +|start +|n/a +|Starts the Apache Unomi application. Note that this state will be remembered between Apache Karaf launches, so in general it is only needed after a first installation or after a `migrate` command + +|version +|n/a +|Prints out the currently deployed version of the Apache Unomi application inside the Apache Karaf runtime. +|=== + + Runtime commands + +These commands are available once the application is running. If an argument is between brackets [] it means it is optional. + +.Table Runtime commands +|=== +|Command|Arguments|Description
incubator-unomi git commit: UNOMI-208 Improve documentation flow - Add generation of manual archives
Repository: incubator-unomi Updated Branches: refs/heads/master cfe3158e7 -> f502839ba UNOMI-208 Improve documentation flow - Add generation of manual archives Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/f502839b Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/f502839b Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/f502839b Branch: refs/heads/master Commit: f502839ba295c6b80254def597ed9e55ecaa7e89 Parents: cfe3158 Author: Serge Huber Authored: Mon Nov 5 15:13:56 2018 +0100 Committer: Serge Huber Committed: Mon Nov 5 15:13:56 2018 +0100 -- generate-site-and-upload.sh | 8 +++- generate-site.sh| 8 +++- manual/pom.xml | 17 - 3 files changed, 26 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f502839b/generate-site-and-upload.sh -- diff --git a/generate-site-and-upload.sh b/generate-site-and-upload.sh index d8dc0c5..87338e8 100755 --- a/generate-site-and-upload.sh +++ b/generate-site-and-upload.sh @@ -25,6 +25,12 @@ fi echo Generating documentation... mvn clean cd manual +mvn -Phtml -Ddoc.source=src/archives/1.1/asciidoc -Ddoc.output.html=target/generated-html/1_1_x +mvn -Ppdf -Ddoc.source=src/archives/1.1/asciidoc -Ddoc.output.pdf=target/generated-pdf/1_1_x +mvn -Phtml -Ddoc.source=src/archives/1.2/asciidoc -Ddoc.output.html=target/generated-html/1_2_x +mvn -Ppdf -Ddoc.source=src/archives/1.2/asciidoc -Ddoc.output.pdf=target/generated-pdf/1_2_x +mvn -Phtml -Ddoc.source=src/archives/1.3/asciidoc -Ddoc.output.html=target/generated-html/1_3_x +mvn -Ppdf -Ddoc.source=src/archives/1.3/asciidoc -Ddoc.output.pdf=target/generated-pdf/1_3_x mvn -Phtml mvn -Ppdf cd .. @@ -36,7 +42,7 @@ cd .. mkdir target/staging/unomi-api mkdir target/staging/manual cp -R target/site/apidocs target/staging/unomi-api -cp -R manual/target/generated-html/latest target/staging/manual +cp -Rf manual/target/generated-html/* target/staging/manual echo Committing documentation to Apache SVN... mvn scm-publish:publish-scm -Dscmpublish.pubScmUrl=scm:svn:https://svn.apache.org/repos/asf/incubator/unomi/website/manual -Dscmpublish.content=target/staging/manual -Dusername=$1 -Dpassword=$2 mvn scm-publish:publish-scm -Dscmpublish.pubScmUrl=scm:svn:https://svn.apache.org/repos/asf/incubator/unomi/website/unomi-api -Dscmpublish.content=target/staging/unomi-api -Dusername=$1 -Dpassword=$2 http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f502839b/generate-site.sh -- diff --git a/generate-site.sh b/generate-site.sh index 10b23f8..35aee66 100755 --- a/generate-site.sh +++ b/generate-site.sh @@ -20,6 +20,12 @@ echo Generating documentation... mvn clean cd manual +mvn -Phtml -Ddoc.source=src/archives/1.1/asciidoc -Ddoc.output.html=target/generated-html/1_1_x +mvn -Ppdf -Ddoc.source=src/archives/1.1/asciidoc -Ddoc.output.pdf=target/generated-pdf/1_1_x +mvn -Phtml -Ddoc.source=src/archives/1.2/asciidoc -Ddoc.output.html=target/generated-html/1_2_x +mvn -Ppdf -Ddoc.source=src/archives/1.2/asciidoc -Ddoc.output.pdf=target/generated-pdf/1_2_x +mvn -Phtml -Ddoc.source=src/archives/1.3/asciidoc -Ddoc.output.html=target/generated-html/1_3_x +mvn -Ppdf -Ddoc.source=src/archives/1.3/asciidoc -Ddoc.output.pdf=target/generated-pdf/1_3_x mvn -Phtml mvn -Ppdf cd .. @@ -31,5 +37,5 @@ cd .. mkdir target/staging/unomi-api mkdir target/staging/manual cp -R target/site/apidocs target/staging/unomi-api -cp -R manual/target/generated-html/latest target/staging/manual +cp -Rf manual/target/generated-html/* target/staging/manual echo Documentation generation completed! \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/f502839b/manual/pom.xml -- diff --git a/manual/pom.xml b/manual/pom.xml index 6403a5c..bf1c47f 100644 --- a/manual/pom.xml +++ b/manual/pom.xml @@ -30,6 +30,13 @@ Apache Unomi :: Manual bundle + +src/main/asciidoc +target/generated-html/latest +target/generated-pdf/latest + + + html @@ -60,11 +67,11 @@ - src/main/asciidoc - target/generated-html/latest +${doc.source} + ${doc.output.html} true true -src/main/asciidoc/images +
incubator-unomi git commit: UNOMI-208 Improve documentation flow & document tracker integration
Repository: incubator-unomi Updated Branches: refs/heads/master 5e4cd3730 -> cfe3158e7 UNOMI-208 Improve documentation flow & document tracker integration Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/cfe3158e Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/cfe3158e Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/cfe3158e Branch: refs/heads/master Commit: cfe3158e7bb0fecd38e980e7d99e401f3c345ec8 Parents: 5e4cd37 Author: Serge Huber Authored: Fri Nov 2 16:44:10 2018 +0100 Committer: Serge Huber Committed: Fri Nov 2 16:44:10 2018 +0100 -- manual/src/main/asciidoc/5-min-quickstart.adoc | 38 +++ .../main/asciidoc/building-and-deploying.adoc | 40 +--- manual/src/main/asciidoc/configuration.adoc | 4 - manual/src/main/asciidoc/custom-extensions.adoc | 89 manual/src/main/asciidoc/getting-started.adoc | 7 +- manual/src/main/asciidoc/index.adoc | 30 +++--- .../src/main/asciidoc/installing-tracker.adoc | 44 manual/src/main/asciidoc/patches.adoc | 102 +++ .../src/main/asciidoc/samples/login-sample.adoc | 10 -- 9 files changed, 208 insertions(+), 156 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cfe3158e/manual/src/main/asciidoc/5-min-quickstart.adoc -- diff --git a/manual/src/main/asciidoc/5-min-quickstart.adoc b/manual/src/main/asciidoc/5-min-quickstart.adoc new file mode 100644 index 000..5bb2e20 --- /dev/null +++ b/manual/src/main/asciidoc/5-min-quickstart.adoc @@ -0,0 +1,38 @@ +// +// 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 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. +// + Five Minutes QuickStart + +1) Install JDK 8 (http://www.oracle.com/technetwork/java/javase/downloads/index.html) and make sure you set the +JAVA_HOME variable https://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/ + +2) Download ElasticSearch here : https://www.elastic.co/downloads/past-releases/elasticsearch-5-6-3 (please make sure you use the proper version : 5.6.3) + +3) Uncompress it and change the `config/elasticsearch.yml` to include the following config : cluster.name: contextElasticSearch + +4) Launch ElasticSearch using : `bin/elasticsearch` + +5) Download Apache Unomi here : http://unomi.incubator.apache.org/download.html + +6) Start it using : `./bin/karaf` + +7) Start the Apache Unomi packages using `unomi:start` in the Apache Karaf Shell + +8) Wait for startup to complete + +9) Try accessing https://localhost:9443/cxs/cluster with username/password: `karaf/karaf` . You might get a certificate warning in your browser, just accept it despite the warning it is safe. + +10) Request your first context by simply accessing : http://localhost:8181/context.js?sessionId=1234 + +11) If something goes wrong, you should check the logs in `./data/log/karaf.log`. If you get errors on ElasticSearch, +make sure you are using the proper version. http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/cfe3158e/manual/src/main/asciidoc/building-and-deploying.adoc -- diff --git a/manual/src/main/asciidoc/building-and-deploying.adoc b/manual/src/main/asciidoc/building-and-deploying.adoc index b285779..e7e5a11 100644 --- a/manual/src/main/asciidoc/building-and-deploying.adoc +++ b/manual/src/main/asciidoc/building-and-deploying.adoc @@ -29,8 +29,9 @@ Building -1) Change to the top level directory of Apache Unomi source distribution. -2) Run +1) Get the code: `git clone https://git-wip-us.apache.org/repos/asf/incubator-unomi.git` +2) Change to the top level directory of Apache Unomi source distribution. +3) Run [source] @@ -48,27 +49,21 @@ This will compile Apache Unomi and run all of the tests in the This will compile Apache Unomi without running the tests and takes less time to build. -3) The distributions will be available under "package/target" directory. +4) The distributions will be available under "package/target" directory. Installing an ElasticSearch server Starting with version 1.2, Apache Unomi no longer embeds an ElasticSearch
incubator-unomi git commit: UNOMI-206 Add endpoint to query events
Repository: incubator-unomi Updated Branches: refs/heads/master 300f1979b -> 291636af4 UNOMI-206 Add endpoint to query events Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/291636af Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/291636af Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/291636af Branch: refs/heads/master Commit: 291636af49f81b21cf4bb6ddb13d532a33a28676 Parents: 300f197 Author: Serge Huber Authored: Mon Oct 22 20:43:26 2018 +0200 Committer: Serge Huber Committed: Mon Oct 22 20:43:26 2018 +0200 -- .../apache/unomi/rest/EventServiceEndpoint.java | 62 .../resources/OSGI-INF/blueprint/blueprint.xml | 16 + .../services/services/EventServiceImpl.java | 1 + 3 files changed, 79 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/291636af/rest/src/main/java/org/apache/unomi/rest/EventServiceEndpoint.java -- diff --git a/rest/src/main/java/org/apache/unomi/rest/EventServiceEndpoint.java b/rest/src/main/java/org/apache/unomi/rest/EventServiceEndpoint.java new file mode 100644 index 000..d9e028b --- /dev/null +++ b/rest/src/main/java/org/apache/unomi/rest/EventServiceEndpoint.java @@ -0,0 +1,62 @@ +/* + * 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.rest; + +import org.apache.cxf.rs.security.cors.CrossOriginResourceSharing; +import org.apache.unomi.api.Event; +import org.apache.unomi.api.PartialList; +import org.apache.unomi.api.query.Query; +import org.apache.unomi.api.services.EventService; + +import javax.jws.WebMethod; +import javax.jws.WebService; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +/** + * A JAX-RS endpoint to access information about the context server's events. + */ +@WebService +@Produces(MediaType.APPLICATION_JSON) +@CrossOriginResourceSharing( +allowAllOrigins = true, +allowCredentials = true +) +public class EventServiceEndpoint { + +private EventService eventService; + +@WebMethod(exclude = true) +public void setEventService(EventService eventService) { +this.eventService = eventService; +} + +/** + * Allows to search events using a query. + * @param query the query object to use to search for events. You can specify offset and limits along with a + * condition tree. + * @return a partial list containing the events that match the query. + */ +@POST +@Path("/search") +public PartialList searchEvents(Query query) { +return eventService.searchEvents(query.getCondition(), query.getOffset(), query.getLimit()); +} + +} http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/291636af/rest/src/main/resources/OSGI-INF/blueprint/blueprint.xml -- diff --git a/rest/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/rest/src/main/resources/OSGI-INF/blueprint/blueprint.xml index 082bf7b..4390c64 100644 --- a/rest/src/main/resources/OSGI-INF/blueprint/blueprint.xml +++ b/rest/src/main/resources/OSGI-INF/blueprint/blueprint.xml @@ -190,6 +190,18 @@ + + + + + + + + + + + + @@ -250,6 +262,10 @@ + + + + http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/291636af/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 5217e55..ca8482c 100644 ---
[1/2] incubator-unomi git commit: UNOMI-200 New Karaf shell commands for events, sessions and profiles Remove log message that is not relevant
Repository: incubator-unomi Updated Branches: refs/heads/master 723cc079b -> 414bba269 UNOMI-200 New Karaf shell commands for events, sessions and profiles Remove log message that is not relevant Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/414bba26 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/414bba26 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/414bba26 Branch: refs/heads/master Commit: 414bba2695c643deaf5bd36b39bdc31e86cc4d5c Parents: de01dec Author: Serge Huber Authored: Sat Sep 22 09:06:20 2018 +0200 Committer: Serge Huber Committed: Sat Sep 22 09:06:20 2018 +0200 -- .../main/java/org/apache/unomi/shell/commands/EventTailCommand.java | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/414bba26/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/EventTailCommand.java -- diff --git a/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/EventTailCommand.java b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/EventTailCommand.java index 4df6931..99dead1 100644 --- a/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/EventTailCommand.java +++ b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/EventTailCommand.java @@ -66,7 +66,6 @@ public class EventTailCommand extends OsgiCommandSupport { synchronized (this) { wait(); } -out.println("Stopping tail as log.core bundle was stopped."); } catch (InterruptedException e) { // Ignore as it will happen if the user breaks the tail using Ctrl-C } finally {
[2/2] incubator-unomi git commit: Unomi Manual : - move quick start up in the documentation - typo fix
Unomi Manual : - move quick start up in the documentation - typo fix Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/de01dec8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/de01dec8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/de01dec8 Branch: refs/heads/master Commit: de01dec86172c26edf5b39321ab2f97077e885f8 Parents: 723cc07 Author: Serge Huber Authored: Sat Sep 22 09:05:51 2018 +0200 Committer: Serge Huber Committed: Sat Sep 22 09:06:20 2018 +0200 -- manual/src/main/asciidoc/index.adoc | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/de01dec8/manual/src/main/asciidoc/index.adoc -- diff --git a/manual/src/main/asciidoc/index.adoc b/manual/src/main/asciidoc/index.adoc index 7008160..bf2ad48 100644 --- a/manual/src/main/asciidoc/index.adoc +++ b/manual/src/main/asciidoc/index.adoc @@ -28,10 +28,6 @@ image::incubator-logo.png[pdfwidth=35%,align=center] include::concepts.adoc[] -== Extending Unomi via plugins - -include::extending-plugins.adoc[] - == Quick start include::building-and-deploying.adoc[] @@ -40,7 +36,11 @@ include::getting-started.adoc[] include::configuration.adoc[] -== Sample +== Extending Unomi via plugins + +include::extending-plugins.adoc[] + +== Samples include::samples/samples.adoc[]
incubator-unomi git commit: UNOMI-200 New Karaf shell commands for events, sessions and profiles Also in this commit, all existing commands have been prefixed using the unomi scope.
Repository: incubator-unomi Updated Branches: refs/heads/master b4b0560b4 -> 11c847c05 UNOMI-200 New Karaf shell commands for events, sessions and profiles Also in this commit, all existing commands have been prefixed using the unomi scope. Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/11c847c0 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/11c847c0 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/11c847c0 Branch: refs/heads/master Commit: 11c847c0594b63d96c550ab57abbad32d3ca109f Parents: b4b0560 Author: Serge Huber Authored: Fri Sep 21 15:39:22 2018 +0200 Committer: Serge Huber Committed: Fri Sep 21 15:39:22 2018 +0200 -- .../unomi/shell/commands/ActionListCommand.java | 2 +- .../unomi/shell/commands/ActionViewCommand.java | 2 +- .../unomi/shell/commands/EventTailCommand.java | 126 +++ .../unomi/shell/commands/EventViewCommand.java | 63 ++ .../shell/commands/ProfileListCommand.java | 75 +++ .../shell/commands/ProfileViewCommand.java | 49 .../unomi/shell/commands/RuleListCommand.java | 2 +- .../shell/commands/RuleResetStatsCommand.java | 2 +- .../unomi/shell/commands/RuleViewcommand.java | 2 +- .../shell/commands/SegmentListCommand.java | 2 +- .../shell/commands/SegmentViewCommand.java | 2 +- .../shell/commands/SessionListCommand.java | 75 +++ .../shell/commands/SessionViewCommand.java | 48 +++ .../resources/OSGI-INF/blueprint/blueprint.xml | 39 +- 14 files changed, 476 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/11c847c0/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/ActionListCommand.java -- diff --git a/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/ActionListCommand.java b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/ActionListCommand.java index 74a4339..d6525ec 100644 --- a/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/ActionListCommand.java +++ b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/ActionListCommand.java @@ -25,7 +25,7 @@ import org.apache.unomi.common.DataTable; import java.util.ArrayList; import java.util.Collection; -@Command(scope = "action", name = "list", description = "This will list all the actions deployed in the Apache Unomi Context Server") +@Command(scope = "unomi", name = "action-list", description = "This will list all the actions deployed in the Apache Unomi Context Server") public class ActionListCommand extends ListCommandSupport { private DefinitionsService definitionsService; http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/11c847c0/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/ActionViewCommand.java -- diff --git a/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/ActionViewCommand.java b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/ActionViewCommand.java index 3852fc0..9d1b820 100644 --- a/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/ActionViewCommand.java +++ b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/ActionViewCommand.java @@ -23,7 +23,7 @@ import org.apache.unomi.api.actions.ActionType; import org.apache.unomi.api.services.DefinitionsService; import org.apache.unomi.persistence.spi.CustomObjectMapper; -@Command(scope = "action", name = "view", description = "This will display a single action deployed in the Apache Unomi Context Server") +@Command(scope = "unomi", name = "action-view", description = "This will display a single action deployed in the Apache Unomi Context Server") public class ActionViewCommand extends OsgiCommandSupport { private DefinitionsService definitionsService; http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/11c847c0/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/EventTailCommand.java -- diff --git a/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/EventTailCommand.java b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/EventTailCommand.java new file mode 100644 index 000..4df6931 --- /dev/null +++ b/tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/EventTailCommand.java @@ -0,0 +1,126 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more
incubator-unomi git commit: Fix generation and uploading of manual, REST API Doc and JavaDoc
Repository: incubator-unomi Updated Branches: refs/heads/master 60313f858 -> 030f87147 Fix generation and uploading of manual, REST API Doc and JavaDoc Signed-off-by: Serge Huber Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/030f8714 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/030f8714 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/030f8714 Branch: refs/heads/master Commit: 030f87147b1b8bffb0cd6d1f675ae638ff85fdbb Parents: 60313f8 Author: Serge Huber Authored: Thu Sep 20 21:21:13 2018 +0200 Committer: Serge Huber Committed: Thu Sep 20 21:21:13 2018 +0200 -- generate-site-and-upload.sh | 5 +++-- generate-site.sh| 5 +++-- pom.xml | 7 +++ 3 files changed, 13 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/030f8714/generate-site-and-upload.sh -- diff --git a/generate-site-and-upload.sh b/generate-site-and-upload.sh index 7763efd..d8dc0c5 100755 --- a/generate-site-and-upload.sh +++ b/generate-site-and-upload.sh @@ -28,13 +28,14 @@ cd manual mvn -Phtml mvn -Ppdf cd .. +echo Generating Javadoc... +mvn javadoc:aggregate -P integration-tests cd rest -mvn javadoc:aggregate mvn package cd .. mkdir target/staging/unomi-api -cp -R rest/target/site/apidocs target/staging/unomi-api mkdir target/staging/manual +cp -R target/site/apidocs target/staging/unomi-api cp -R manual/target/generated-html/latest target/staging/manual echo Committing documentation to Apache SVN... mvn scm-publish:publish-scm -Dscmpublish.pubScmUrl=scm:svn:https://svn.apache.org/repos/asf/incubator/unomi/website/manual -Dscmpublish.content=target/staging/manual -Dusername=$1 -Dpassword=$2 http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/030f8714/generate-site.sh -- diff --git a/generate-site.sh b/generate-site.sh index 06c27f2..10b23f8 100755 --- a/generate-site.sh +++ b/generate-site.sh @@ -23,12 +23,13 @@ cd manual mvn -Phtml mvn -Ppdf cd .. +echo Generating Javadoc... +mvn javadoc:aggregate -P integration-tests cd rest -mvn javadoc:aggregate mvn package cd .. mkdir target/staging/unomi-api -cp -R rest/target/site/apidocs target/staging/unomi-api mkdir target/staging/manual +cp -R target/site/apidocs target/staging/unomi-api cp -R manual/target/generated-html/latest target/staging/manual echo Documentation generation completed! \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/030f8714/pom.xml -- diff --git a/pom.xml b/pom.xml index d29915e..a355855 100644 --- a/pom.xml +++ b/pom.xml @@ -1002,6 +1002,11 @@ maven-dependency-plugin 2.10 + +org.apache.maven.plugins +maven-scm-publish-plugin +3.0.0 + @@ -1019,6 +1024,7 @@ maven-bundle-plugin true + org.apache.maven.plugins maven-site-plugin
[1/2] incubator-unomi git commit: Update generation of documentation script
Repository: incubator-unomi Updated Branches: refs/heads/master f0b309019 -> 60313f858 Update generation of documentation script Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/9e685bd6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/9e685bd6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/9e685bd6 Branch: refs/heads/master Commit: 9e685bd686af19cc2b83a747a456ec4fe66c8d27 Parents: b32fce9 Author: Francois Papon Authored: Thu Sep 20 16:49:34 2018 +0400 Committer: Francois Papon Committed: Thu Sep 20 21:30:08 2018 +0400 -- generate-site-and-upload.sh | 23 +-- generate-site.sh| 16 +--- manual/pom.xml | 4 ++-- rest/pom.xml| 8 +--- 4 files changed, 33 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/9e685bd6/generate-site-and-upload.sh -- diff --git a/generate-site-and-upload.sh b/generate-site-and-upload.sh index ac0e591..7763efd 100755 --- a/generate-site-and-upload.sh +++ b/generate-site-and-upload.sh @@ -22,11 +22,22 @@ if [ $# -ne 2 ] echo "Illegal number of arguments supplied. Syntax should be generate-site-and-upload.sh SVNusername SVNpassword" exit 1 fi -echo Generating site... -mvn clean install site site:stage -P !integration-tests,!performance-tests +echo Generating documentation... +mvn clean +cd manual +mvn -Phtml +mvn -Ppdf +cd .. cd rest +mvn javadoc:aggregate mvn package -cd - -echo Committing site to Apache SVN... -mvn scm-publish:publish-scm -Dusername=$1 -Dpassword=$2 -echo Site generation and upload completed. \ No newline at end of file +cd .. +mkdir target/staging/unomi-api +cp -R rest/target/site/apidocs target/staging/unomi-api +mkdir target/staging/manual +cp -R manual/target/generated-html/latest target/staging/manual +echo Committing documentation to Apache SVN... +mvn scm-publish:publish-scm -Dscmpublish.pubScmUrl=scm:svn:https://svn.apache.org/repos/asf/incubator/unomi/website/manual -Dscmpublish.content=target/staging/manual -Dusername=$1 -Dpassword=$2 +mvn scm-publish:publish-scm -Dscmpublish.pubScmUrl=scm:svn:https://svn.apache.org/repos/asf/incubator/unomi/website/unomi-api -Dscmpublish.content=target/staging/unomi-api -Dusername=$1 -Dpassword=$2 +mvn scm-publish:publish-scm -Dscmpublish.pubScmUrl=scm:svn:https://svn.apache.org/repos/asf/incubator/unomi/website/rest-api-doc -Dscmpublish.content=target/staging/rest-api-doc -Dusername=$1 -Dpassword=$2 +echo Documentation generation and upload completed. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/9e685bd6/generate-site.sh -- diff --git a/generate-site.sh b/generate-site.sh index fe3ebd2..06c27f2 100755 --- a/generate-site.sh +++ b/generate-site.sh @@ -17,8 +17,18 @@ #limitations under the License. # -echo Generating site... -mvn site site:stage -P !integration-tests,!performance-tests +echo Generating documentation... +mvn clean +cd manual +mvn -Phtml +mvn -Ppdf +cd .. cd rest +mvn javadoc:aggregate mvn package -cd - +cd .. +mkdir target/staging/unomi-api +cp -R rest/target/site/apidocs target/staging/unomi-api +mkdir target/staging/manual +cp -R manual/target/generated-html/latest target/staging/manual +echo Documentation generation completed! \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/9e685bd6/manual/pom.xml -- diff --git a/manual/pom.xml b/manual/pom.xml index 01f9310..6403a5c 100644 --- a/manual/pom.xml +++ b/manual/pom.xml @@ -61,7 +61,7 @@ src/main/asciidoc - target/generated-html/${project.version} + target/generated-html/latest true true src/main/asciidoc/images @@ -89,7 +89,7 @@ src/main/asciidoc - target/generated-pdf/${project.version} + target/generated-pdf/latest true true pdf http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/9e685bd6/rest/pom.xml -- diff --git a/rest/pom.xml b/rest/pom.xml index