You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by sh...@apache.org on 2019/05/12 14:44:38 UTC

[unomi] branch UNOMI-180-CXS-GRAPHQLAPI updated (8269262 -> 241a579)

This is an automated email from the ASF dual-hosted git repository.

shuber pushed a change to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git.


 discard 8269262  UNOMI-180 Implement CXS GraphQL API - Update dependency versions to make the GraphQL framework work again
 discard d1053a8  UNOMI-180 Implement CXS GraphQL API - Update version numbers
 discard b0bb8d0  UNOMI-180 Implement CXS GraphQL API - Rename CXS to CDP
 discard e2f4e0d  UNOMI-180 Implement CXS GraphQL API - Modify the type generation to use "Input" suffix for input types instead of a prefix.
 discard 146e755  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
 discard c447bef  UNOMI-180 Implement CXS GraphQL API Make sure we use CXS_ prefix everywhere.
 discard f4e2503  UNOMI-180 Implement CXS GraphQL API Get event type creation to work (partially, the event GraphQL schema types are not yet properly modified)
 discard ccfa64f  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.
 discard fce8f64  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
 discard 8501714  UNOMI-180 Implement CXS GraphQL API - We now have basic filtering generation for event types working !
 discard 3d320bc  UNOMI-180 Implement CXS GraphQL API - Event type registration and dynamic schema generation is now mostly working !
 discard f3f5f9e  UNOMI-180 Implement CXS GraphQL API - First implementation of registering event types. Not yet perfect but some parts are working.
 discard a120d3d  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.
 discard 6491ac2  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.
     add cae989b  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.
     add c360cbc  UNOMI-213 Move twitter sample HTML out of root context and build a proper HTML welcome page in the root context
     add b3b6c5c  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&f
     add b872249  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
     add 3bd9549  UNOMI-214 Fix integration tests
     add 48d4f89  UNOMI-214 Fix integration tests - Fix event tail command that was not printing out to the proper output
     add 45b04c2  UNOMI-208 Improve documentation - Fix issues with ElasticSearch X-Pack documentation levels being too high - Added new documentation on useful URLs to know
     add ac325f9  UNOMI-187 Integrate analytics.js - Fix tracking of tags and categories on initial page tracking call
     add f67674e  UNOMI-215 New rule monitoring commands & other new commands - New condition list & view shell commands - New rule tail & rule shell commands
     add ac1ce57  UNOMI-187 Integrate analytics.js - Fix tracking of tags and categories on initial page tracking call
     add e507563  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
     add 0c24a02  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.
     add 099abb0  UNOMI-187 Integrate analytics.js - Remove language parameter as it seems to cause problems and is not really used.
     add b873b35  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 en [...]
     add c569f63  UNOMI-216 Centralize configuration in unomi.properties - Simplify configuration by just using a system properties file instead of a custom.properties file
     add 252cca8  UNOMI-216 Centralize configuration in unomi.properties - Update documentation to point to centralized configuration whenever possible.
     add 4b447c2  UNOMI-216 Centralize configuration in unomi.properties - Remove interface from Hazelcast TCP-IP configuration
     add d3b1e95  UNOMI-217 merge system properties during profile merge
     add 26ce3c1  UNOMI-217: improve namings
     add bf12dd5  Add Jenkins build and Maven central badges
     add 0aa6e6c  Merge pull request #74 from fpapon/README-BADGE
     add d431a54  Update copyright
     add 9cd7c00  UNOMI-218 add queryParam annotation to the Unomi server rest API methods
     add ab96c77  This closes pull request number #76
     add 06d6820  Fix Kar feature deployment in Karaf 4.2.x
     add 724d34c  This closes pull request number #75
     add b48dc09  Update developper list in README
     add 1745c52  Merge pull request #77 from fpapon/README
     add f97ee4b  UNOMI-220 eliminates leading and trailing spaces into ip value
     add c97335d  UNOMI-223 increment score if profile scores is empty
     add fb945de  This closes pull request number #79
     add c447224  [UNOMI-224] fix an API bug which may crash the program.
     add 18e9bc2  This closes pull request number #80
     add b078f50  Clean incubator urls
     add 850982b  UNOMI-226 Allow for ranges of ip addresses or CIDR masks for secure event sources
     add 11e2c47  Clean incubator scm and mailing lists
     add 9a9ad91  Remove incubating in release version
     add a1348b3  Merge pull request #82 from fpapon/CLEAN-INCUBATOR-2
     add 1d3d8f1  [UNOMI-227] Upgrade to Apache pom parent 21
     add 3a46314  DMF-3490: simplify authenticateThirdPartyServer algorithm
     add 0e81668  UNOMI-226 Document how to use the IP addresses ranges and subnet support.
     add ea788ca  Added docker from mikeghen/unomi-dokcer
     add f89312c  Remove dependancy on mikeghen/unomi, added to readme
     add 8591255  - Fix issues with missing ASL headers - Improve README to add instructions on how to build Docker image
     add a503e3e  UNOMI-216 Centralize configuration in unomi.properties - Fix broken Salesforce unit test broken by introduction of default values for property values.
     add cdfbfb6  UNOMI-208 Improve documentation - Fixed flow by fixing heading levels that were not correct - Moved the request examples to a separate document to make them more visible - Moved the consent API higher up - Made all curl examples that use POST bodies use multiline bodies to make them easier to read - Made the web tracker also stand out some more
     add 41206f6  UNOMI-208 Improve documentation - Fix image reference for latest documentation, probably still have to fix it for archives
     add abe5342  UNOMI-208 Improve documentation - Fix image reference in archived documentation
     add 6895351  UNOMI-231 Windows building issues - Deactivate (temporarily) the miredot plugin that generates a System.exit on Windows - Reduce the system load of the unit tests as they seem to be put too much stress on Windows platforms. - Update ElasticSearch plugin to latest version to address some Windows issues
     new 6676615  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.
     new d5d6725  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.
     new 50a98ff  UNOMI-180 Implement CXS GraphQL API - First implementation of registering event types. Not yet perfect but some parts are working.
     new 2b2f883  UNOMI-180 Implement CXS GraphQL API - Event type registration and dynamic schema generation is now mostly working !
     new a08ed04  UNOMI-180 Implement CXS GraphQL API - We now have basic filtering generation for event types working !
     new 35853e8  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
     new 165b532  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.
     new ab9e96f  UNOMI-180 Implement CXS GraphQL API Get event type creation to work (partially, the event GraphQL schema types are not yet properly modified)
     new 1443ccb  UNOMI-180 Implement CXS GraphQL API Make sure we use CXS_ prefix everywhere.
     new ab68e03  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
     new 5fe299e  UNOMI-180 Implement CXS GraphQL API - Modify the type generation to use "Input" suffix for input types instead of a prefix.
     new 29faaee  UNOMI-180 Implement CXS GraphQL API - Rename CXS to CDP
     new f49281d  UNOMI-180 Implement CXS GraphQL API - Update version numbers
     new f6ffe38  UNOMI-180 Implement CXS GraphQL API - Update dependency versions to make the GraphQL framework work again
     new 241a579  UNOMI-180 - Updated GraphQL projects to latest version - Added CDP SDL schema generated from latest CDP specification

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (8269262)
            \
             N -- N -- N   refs/heads/UNOMI-180-CXS-GRAPHQLAPI (241a579)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 15 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                                         |    1 +
 MERGING-PULL-REQUESTS                              |    2 +-
 NOTICE                                             |    2 +-
 README.md                                          |    6 +-
 api/pom.xml                                        |    2 +-
 .../unomi/api/services/RuleListenerService.java    |   61 ++
 common/pom.xml                                     |    2 +-
 .../main/resources/logo.txt => docker/Dockerfile   |   29 +-
 docker/README.md                                   |   39 +
 .../custom.properties => docker/docker-compose.yml |   49 +-
 .../etc/custom.properties => docker/entrypoint.sh  |   31 +-
 extensions/geonames/pom.xml                        |    2 +-
 extensions/geonames/rest/pom.xml                   |    2 +-
 extensions/geonames/services/pom.xml               |    2 +-
 .../main/resources/org.apache.unomi.geonames.cfg   |    6 +-
 extensions/lists-extension/actions/pom.xml         |    2 +-
 extensions/lists-extension/pom.xml                 |    2 +-
 extensions/lists-extension/rest/pom.xml            |    2 +-
 extensions/lists-extension/services/pom.xml        |    2 +-
 extensions/pom.xml                                 |    2 +-
 extensions/privacy-extension/pom.xml               |    2 +-
 extensions/privacy-extension/rest/pom.xml          |    2 +-
 extensions/privacy-extension/services/pom.xml      |    4 +-
 extensions/router/pom.xml                          |    2 +-
 extensions/router/router-api/pom.xml               |    2 +-
 extensions/router/router-core/pom.xml              |    2 +-
 .../core/processor/LineSplitFailureHandler.java    |   12 +-
 .../src/main/resources/org.apache.unomi.router.cfg |   30 +-
 extensions/router/router-karaf-feature/pom.xml     |    2 +-
 extensions/router/router-rest/pom.xml              |    2 +-
 extensions/router/router-service/pom.xml           |    2 +-
 extensions/salesforce-connector/actions/pom.xml    |    2 +-
 extensions/salesforce-connector/karaf-kar/pom.xml  |    2 +-
 extensions/salesforce-connector/pom.xml            |    2 +-
 extensions/salesforce-connector/rest/pom.xml       |    2 +-
 extensions/salesforce-connector/services/pom.xml   |    8 +-
 .../src/main/resources/org.apache.unomi.sfdc.cfg   |   24 +-
 .../services/internal/SFDCServiceImplTest.java     |    4 +-
 extensions/unomi-mailchimp/actions/pom.xml         |    2 +-
 extensions/unomi-mailchimp/karaf-kar/pom.xml       |    2 +-
 extensions/unomi-mailchimp/pom.xml                 |    2 +-
 extensions/unomi-mailchimp/rest/pom.xml            |    2 +-
 extensions/unomi-mailchimp/services/pom.xml        |    2 +-
 .../org.apache.unomi.mailchimpconnector.cfg        |    8 +-
 extensions/weather-update/core/pom.xml             |    2 +-
 .../resources/org.apache.unomi.weatherUpdate.cfg   |    6 +-
 extensions/weather-update/karaf-kar/pom.xml        |    2 +-
 extensions/weather-update/pom.xml                  |    2 +-
 .../web-tracker/javascript/dist/unomi-tracker.js   | 1044 ++++++++++++++++----
 .../javascript/dist/unomi-tracker.min.js           |    8 +-
 extensions/web-tracker/javascript/package.json     |    3 +-
 .../src/analytics.js-integration-apache-unomi.js   |   84 +-
 extensions/web-tracker/javascript/yarn.lock        |  654 +++---------
 extensions/web-tracker/karaf-kar/pom.xml           |    2 +-
 extensions/web-tracker/pom.xml                     |    2 +-
 extensions/web-tracker/wab/pom.xml                 |    9 +-
 .../META-INF/cxs/rules/form-mapping-example.json   |   52 +
 .../web-tracker/wab/src/main/webapp/index.html     |  173 +++-
 generate-site-and-upload.sh                        |    6 +-
 graphql/cxs-impl/src/main/resources/cdp-schema.sdl |  Bin 0 -> 45752 bytes
 graphql/pom.xml                                    |    6 +-
 itests/pom.xml                                     |    5 +-
 .../test/java/org/apache/unomi/itests/BaseIT.java  |    6 +-
 .../java/org/apache/unomi/itests/TestUtils.java    |   19 +-
 kar/pom.xml                                        |    2 +-
 kar/src/main/feature/feature.xml                   |    6 +
 lifecycle-watcher/pom.xml                          |    2 +-
 manual/pom.xml                                     |    2 +-
 .../src/archives/1.1/asciidoc/getting-started.adoc |    3 +-
 .../1.2/asciidoc/samples/twitter-sample.adoc       |    3 +-
 .../1.3/asciidoc/samples/twitter-sample.adoc       |    3 +-
 manual/src/main/asciidoc/5-min-quickstart.adoc     |    2 +-
 manual/src/main/asciidoc/clustering.adoc           |   70 +-
 manual/src/main/asciidoc/concepts.adoc             |    8 +-
 manual/src/main/asciidoc/configuration.adoc        |  214 ++--
 .../asciidoc/connectors/mailchimp-connector.adoc   |   10 +-
 .../asciidoc/connectors/salesforce-connector.adoc  |   18 +-
 manual/src/main/asciidoc/consent-api.adoc          |   73 +-
 manual/src/main/asciidoc/extending-plugins.adoc    |   16 +-
 manual/src/main/asciidoc/getting-started.adoc      |   82 +-
 manual/src/main/asciidoc/index.adoc                |   24 +-
 manual/src/main/asciidoc/installing-tracker.adoc   |  115 ---
 manual/src/main/asciidoc/patches.adoc              |    2 +-
 manual/src/main/asciidoc/request-examples.adoc     |  158 +++
 .../src/main/asciidoc/samples/twitter-sample.adoc  |    3 +-
 manual/src/main/asciidoc/shell-commands.adoc       |   37 +-
 manual/src/main/asciidoc/useful-unomi-urls.adoc    |   83 ++
 manual/src/main/asciidoc/web-tracker.adoc          |  335 +++++++
 metrics/pom.xml                                    |    2 +-
 .../unomi/metrics/internal/MetricsServiceTest.java |    7 +-
 package/pom.xml                                    |    2 +-
 package/src/main/resources/etc/custom.properties   |    6 -
 .../main/resources/etc/custom.system.properties    |  322 ++++++
 .../src/main/resources/etc/org.apache.cxf.osgi.cfg |    2 +-
 .../main/resources/etc/org.apache.karaf.jaas.cfg   |   63 +-
 .../main/resources/etc/org.apache.karaf.shell.cfg  |   20 +-
 .../main/resources/etc/org.ops4j.pax.logging.cfg   |   14 +-
 ...g.apache.cxf.osgi.cfg => org.ops4j.pax.web.cfg} |    6 +-
 .../src/main/resources/etc/users.properties        |   33 +-
 performance-tests/pom.xml                          |    2 +-
 persistence-elasticsearch/core/pom.xml             |    2 +-
 .../org.apache.unomi.persistence.elasticsearch.cfg |   30 +-
 persistence-elasticsearch/pom.xml                  |    2 +-
 persistence-spi/pom.xml                            |    2 +-
 plugins/baseplugin/pom.xml                         |    2 +-
 .../conditions/PropertyConditionEvaluatorTest.java |    6 +-
 plugins/hover-event/pom.xml                        |    2 +-
 plugins/mail/pom.xml                               |    2 +-
 .../resources/org.apache.unomi.plugins.mail.cfg    |   10 +-
 plugins/optimization-test/pom.xml                  |    2 +-
 plugins/past-event/pom.xml                         |    2 +-
 plugins/pom.xml                                    |    2 +-
 plugins/request/pom.xml                            |    2 +-
 .../resources/org.apache.unomi.plugins.request.cfg |   18 +-
 plugins/tracked-event/pom.xml                      |    2 +-
 pom.xml                                            |   42 +-
 rest/pom.xml                                       |  335 ++++---
 .../apache/unomi/rest/ProfileServiceEndPoint.java  |    7 +-
 .../apache/unomi/rest/ScoringServiceEndPoint.java  |   10 +-
 .../apache/unomi/rest/SegmentServiceEndPoint.java  |   11 +-
 .../apache/unomi/rest/UserListServiceEndPoint.java |   16 +-
 samples/login-integration/pom.xml                  |    2 +-
 samples/pom.xml                                    |    2 +-
 samples/tweet-button-plugin/pom.xml                |    5 +-
 .../src/main/webapp/index.html                     |    5 +-
 services/pom.xml                                   |    9 +-
 .../unomi/services/services/EventServiceImpl.java  |   26 +-
 .../services/services/ProfileServiceImpl.java      |   51 +
 .../unomi/services/services/RulesServiceImpl.java  |   44 +-
 .../unomi/services/services/ThirdPartyServer.java  |    9 +-
 .../sorts/ScorePersonalizationStrategy.java        |    2 +
 .../resources/OSGI-INF/blueprint/blueprint.xml     |    8 +
 services/src/main/resources/hazelcast.xml          |    8 +-
 .../main/resources/org.apache.unomi.cluster.cfg    |    8 +-
 .../main/resources/org.apache.unomi.services.cfg   |   22 +-
 .../main/resources/org.apache.unomi.thirdparty.cfg |    6 +-
 tools/pom.xml                                      |    2 +-
 tools/shell-commands/pom.xml                       |   16 +-
 .../java/org/apache/unomi/shell/actions/Start.java |   18 +-
 .../java/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 +-
 .../unomi/shell/migration/impl/MigrationTo121.java |   14 +-
 .../unomi/shell/migration/impl/MigrationTo122.java |    8 +-
 .../unomi/shell/migration/utils/ConsoleUtils.java  |   20 +-
 .../unomi/shell/migration/utils/HttpUtils.java     |    4 +-
 .../resources/OSGI-INF/blueprint/blueprint.xml     |   30 +-
 tools/shell-dev-commands/pom.xml                   |   16 +-
 .../{ActionListCommand.java => ActionList.java}    |   14 +-
 .../{ActionViewCommand.java => ActionView.java}    |   22 +-
 .../{ActionListCommand.java => ConditionList.java} |   28 +-
 .../{ActionViewCommand.java => ConditionView.java} |   40 +-
 ...efinitionCommand.java => DeployDefinition.java} |   77 +-
 .../{EventTailCommand.java => EventTail.java}      |   65 +-
 .../{EventViewCommand.java => EventView.java}      |   27 +-
 .../unomi/shell/commands/ListCommandSupport.java   |    9 +-
 .../{ProfileListCommand.java => ProfileList.java}  |   23 +-
 .../{ProfileViewCommand.java => ProfileView.java}  |   21 +-
 .../{RuleListCommand.java => RuleList.java}        |   35 +-
 ...eResetStatsCommand.java => RuleResetStats.java} |   18 +-
 .../org/apache/unomi/shell/commands/RuleTail.java  |   93 ++
 .../{RuleViewcommand.java => RuleView.java}        |   21 +-
 .../org/apache/unomi/shell/commands/RuleWatch.java |  110 +++
 .../{SegmentListCommand.java => SegmentList.java}  |   18 +-
 .../{SegmentViewCommand.java => SegmentView.java}  |   22 +-
 .../{SessionListCommand.java => SessionList.java}  |   24 +-
 .../{SessionViewCommand.java => SessionView.java}  |   20 +-
 .../unomi/shell/commands/TailCommandSupport.java   |  106 ++
 .../resources/OSGI-INF/blueprint/blueprint.xml     |  115 ---
 wab/pom.xml                                        |    2 +-
 wab/src/main/resources/org.apache.unomi.web.cfg    |    8 +-
 .../main/webapp/images/apache-feather-tm-new.png   |  Bin 0 -> 1359 bytes
 wab/src/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                     |  224 ++---
 176 files changed, 4037 insertions(+), 2238 deletions(-)
 create mode 100644 api/src/main/java/org/apache/unomi/api/services/RuleListenerService.java
 copy lifecycle-watcher/src/main/resources/logo.txt => docker/Dockerfile (55%)
 create mode 100644 docker/README.md
 copy package/src/main/resources/etc/custom.properties => docker/docker-compose.yml (53%)
 copy package/src/main/resources/etc/custom.properties => docker/entrypoint.sh (54%)
 mode change 100644 => 100755
 create mode 100644 extensions/web-tracker/wab/src/main/resources/META-INF/cxs/rules/form-mapping-example.json
 create mode 100644 graphql/cxs-impl/src/main/resources/cdp-schema.sdl
 delete mode 100644 manual/src/main/asciidoc/installing-tracker.adoc
 create mode 100644 manual/src/main/asciidoc/request-examples.adoc
 create mode 100644 manual/src/main/asciidoc/useful-unomi-urls.adoc
 create mode 100644 manual/src/main/asciidoc/web-tracker.adoc
 create mode 100644 package/src/main/resources/etc/custom.system.properties
 copy buildAndRun.sh => package/src/main/resources/etc/org.apache.karaf.jaas.cfg (52%)
 mode change 100755 => 100644
 copy package/src/main/resources/etc/{org.apache.cxf.osgi.cfg => org.ops4j.pax.web.cfg} (77%)
 copy buildAndRun.sh => package/src/main/resources/etc/users.properties (65%)
 mode change 100755 => 100644
 copy {wab => samples/tweet-button-plugin}/src/main/webapp/index.html (97%)
 copy tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/{ActionListCommand.java => ActionList.java} (87%)
 copy tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/{ActionViewCommand.java => ActionView.java} (78%)
 rename tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/{ActionListCommand.java => ConditionList.java} (64%)
 rename tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/{ActionViewCommand.java => ConditionView.java} (53%)
 rename tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/{DeployDefinitionCommand.java => DeployDefinition.java} (88%)
 rename tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/{EventTailCommand.java => EventTail.java} (52%)
 rename tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/{EventViewCommand.java => EventView.java} (78%)
 rename tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/{ProfileListCommand.java => ProfileList.java} (81%)
 rename tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/{ProfileViewCommand.java => ProfileView.java} (79%)
 rename tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/{RuleListCommand.java => RuleList.java} (68%)
 rename tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/{RuleResetStatsCommand.java => RuleResetStats.java} (75%)
 create mode 100644 tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/RuleTail.java
 rename tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/{RuleViewcommand.java => RuleView.java} (79%)
 create mode 100644 tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/RuleWatch.java
 rename tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/{SegmentListCommand.java => SegmentList.java} (80%)
 rename tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/{SegmentViewCommand.java => SegmentView.java} (79%)
 rename tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/{SessionListCommand.java => SessionList.java} (80%)
 rename tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/{SessionViewCommand.java => SessionView.java} (79%)
 create mode 100644 tools/shell-dev-commands/src/main/java/org/apache/unomi/shell/commands/TailCommandSupport.java
 delete mode 100644 tools/shell-dev-commands/src/main/resources/OSGI-INF/blueprint/blueprint.xml
 create mode 100644 wab/src/main/webapp/images/apache-feather-tm-new.png
 create mode 100644 wab/src/main/webapp/images/apache-unomi-380x85.png
 create mode 100644 wab/src/main/webapp/images/unomi-86x20.png


[unomi] 15/15: UNOMI-180 - Updated GraphQL projects to latest version - Added CDP SDL schema generated from latest CDP specification

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit 241a579b1665961bcea8e8bed0a913c8c93b814e
Author: sergehuber <sh...@jahia.com>
AuthorDate: Sun May 12 16:43:35 2019 +0200

    UNOMI-180
    - Updated GraphQL projects to latest version
    - Added CDP SDL schema generated from latest CDP specification
---
 graphql/cxs-impl/src/main/resources/cdp-schema.sdl | Bin 0 -> 45752 bytes
 graphql/pom.xml                                    |   6 +++---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/graphql/cxs-impl/src/main/resources/cdp-schema.sdl b/graphql/cxs-impl/src/main/resources/cdp-schema.sdl
new file mode 100644
index 0000000..22fba9a
Binary files /dev/null and b/graphql/cxs-impl/src/main/resources/cdp-schema.sdl differ
diff --git a/graphql/pom.xml b/graphql/pom.xml
index d879d27..191e642 100644
--- a/graphql/pom.xml
+++ b/graphql/pom.xml
@@ -31,9 +31,9 @@
     <packaging>pom</packaging>
 
     <properties>
-        <graphql.java.servlet.version>7.1.0</graphql.java.servlet.version>
-        <graphql.java.version>11.0</graphql.java.version>
-        <graphql.java.annotations.version>6.1</graphql.java.annotations.version>
+        <graphql.java.servlet.version>7.4.1</graphql.java.servlet.version>
+        <graphql.java.version>12.0</graphql.java.version>
+        <graphql.java.annotations.version>7.0</graphql.java.annotations.version>
         <jackson.version>2.9.7</jackson.version>
     </properties>
 


[unomi] 05/15: UNOMI-180 Implement CXS GraphQL API - We now have basic filtering generation for event types working !

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit a08ed04c71882254cc1e77d34fb0409620ca9f57
Author: Serge Huber <sh...@apache.org>
AuthorDate: Mon May 28 15:07:00 2018 +0200

    UNOMI-180 Implement CXS GraphQL API
    - We now have basic filtering generation for event types working !
    
    Signed-off-by: Serge Huber <sh...@apache.org>
---
 .../apache/unomi/graphql/CXSDateFilterInput.java   |  30 +++
 .../graphql/CXSEventOccurrenceFilterInput.java     |  33 +++
 .../apache/unomi/graphql/CXSGeoDistanceInput.java  |  28 ++
 .../apache/unomi/graphql/CXSGeoDistanceUnit.java   |  23 ++
 .../org/apache/unomi/graphql/CXSGeoPointInput.java |  26 ++
 .../org/apache/unomi/graphql/CXSOrderByInput.java  |  28 ++
 .../org/apache/unomi/graphql/CXSSortOrder.java     |  23 ++
 .../java/org/apache/unomi/graphql/PageInfo.java    |  28 ++
 .../graphql/internal/CXSGraphQLProviderImpl.java   | 285 ++++++++++++++++++++-
 9 files changed, 496 insertions(+), 8 deletions(-)

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 0000000..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;
+}
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 0000000..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;
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceInput.java
new file mode 100644
index 0000000..59d0fa9
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceInput.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;
+
+import graphql.annotations.annotationTypes.GraphQLField;
+
+public class CXSGeoDistanceInput {
+    @GraphQLField
+    public CXSGeoPoint center;
+    @GraphQLField
+    public CXSGeoDistanceUnit unit;
+    @GraphQLField
+    public float distance;
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceUnit.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceUnit.java
new file mode 100644
index 0000000..5db4d3e
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceUnit.java
@@ -0,0 +1,23 @@
+/*
+ * 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;
+
+public enum CXSGeoDistanceUnit {
+    METERS,
+    KILOMETERS,
+    MILES
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointInput.java
new file mode 100644
index 0000000..19b0297
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointInput.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;
+
+import graphql.annotations.annotationTypes.GraphQLField;
+
+public class CXSGeoPointInput {
+    @GraphQLField
+    public float longitude;
+    @GraphQLField
+    public float latitude;
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSOrderByInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSOrderByInput.java
new file mode 100644
index 0000000..a0221d2
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSOrderByInput.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;
+
+import graphql.annotations.annotationTypes.GraphQLField;
+
+public class CXSOrderByInput {
+
+    @GraphQLField
+    public String fieldName;
+
+    @GraphQLField
+    public CXSSortOrder sortOrder;
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSortOrder.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSortOrder.java
new file mode 100644
index 0000000..ca0f3bd
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSortOrder.java
@@ -0,0 +1,23 @@
+/*
+ * 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;
+
+public enum CXSSortOrder {
+    ASC,
+    DESC,
+    UNSPECIFIED
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/PageInfo.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/PageInfo.java
new file mode 100644
index 0000000..a49d774
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/PageInfo.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;
+
+import graphql.annotations.annotationTypes.GraphQLField;
+
+public class PageInfo {
+
+    @GraphQLField
+    public boolean hasPreviousPage;
+    @GraphQLField
+    public boolean hasNextPage;
+
+}
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 6d5a792..2c7a0b4 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
@@ -58,28 +58,229 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
 
     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());
 
-        /*
-        GraphQLObjectInfoRetriever graphQLObjectInfoRetriever = new GraphQLObjectInfoRetriever();
-        GraphQLInputObjectType cxsEventTypeInput = new InputObjectBuilder(graphQLObjectInfoRetriever, new ParentalSearch(graphQLObjectInfoRetriever),
-                new BreadthFirstSearch(graphQLObjectInfoRetriever), new GraphQLFieldRetriever()).
-                getInputObjectBuilder(CXSEventTypeInput.class, GraphQLAnnotations.getInstance().getContainer()).build();
-        registeredInputTypes.put(CXSEventTypeInput.class.getName(), cxsEventTypeInput);
-        */
-
         registeredOutputTypes.put("CXS_Event", buildCXSEventOutputType());
+        registeredOutputTypes.put("CXS_EventEdge", buildCXSEventEdgeOutputType());
+        registeredOutputTypes.put("CXS_EventConnection", buildCXSEventConnectionOutputType());
         registeredOutputTypes.put("CXS_Query", buildCXSQueryOutputType());
         registeredOutputTypes.put("CXS_Mutation", buildCXSMutationOutputType());
     }
 
+    private GraphQLOutputType buildCXSEventEdgeOutputType() {
+        return newObject()
+                .name("CXS_EventEdge")
+                .description("The Relay edge type for the CXS_Event output type")
+                .field(newFieldDefinition()
+                        .name("node")
+                        .type(registeredOutputTypes.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(registeredOutputTypes.get("CXS_EventEdge")))
+                )
+                .field(newFieldDefinition()
+                        .name("pageInfo")
+                        .type(new GraphQLList(registeredOutputTypes.get(PageInfo.class.getName())))
+                )
+                .build();
+    }
+
+    private GraphQLInputType buildCXSEventPropertiesFilterInput() {
+        GraphQLInputObjectType.Builder cxsEventPropertiesFilterInput = newInputObject()
+                .name("CXS_EventPropertiesFilterInput")
+                .description("Filter conditions for each event types and built-in properties");
+
+        generateEventPropertiesFilters(cxsEventPropertiesFilterInput);
+        generateEventTypesFilters(cxsEventPropertiesFilterInput);
+
+        return cxsEventPropertiesFilterInput.build();
+    }
+
+
+    private void generateEventPropertiesFilters(GraphQLInputObjectType.Builder cxsEventPropertiesFilterInput) {
+        addIdentityFilters("id", cxsEventPropertiesFilterInput);
+        addIdentityFilters("sourceId", cxsEventPropertiesFilterInput);
+        addIdentityFilters("clientId", cxsEventPropertiesFilterInput);
+        addIdentityFilters("profileId", cxsEventPropertiesFilterInput);
+        addDistanceFilters("location", cxsEventPropertiesFilterInput);
+        addDateFilters("timestamp", cxsEventPropertiesFilterInput);
+    }
+
+    private void generateEventTypesFilters(GraphQLInputObjectType.Builder cxsEventPropertiesFilterInput) {
+        for (Map.Entry<String,CXSEventType> eventTypeEntry : eventTypes.entrySet()) {
+            addSetFilters(eventTypeEntry.getKey(), eventTypeEntry.getValue().properties, cxsEventPropertiesFilterInput);
+        }
+    }
+
+    private void addSetFilters(String eventTypeName, List<CXSPropertyType> properties, GraphQLInputObjectType.Builder inputTypeBuilder) {
+        GraphQLInputObjectType.Builder eventTypeFilterInput = newInputObject()
+                .name(eventTypeName + "FilterInput")
+                .description("Auto-generated filter input type for event type " + eventTypeName);
+
+        for (CXSPropertyType cxsPropertyType : properties) {
+            if (cxsPropertyType instanceof CXSIdentifierPropertyType) {
+                addIdentityFilters(cxsPropertyType.name, eventTypeFilterInput);
+            } else if (cxsPropertyType instanceof CXSStringPropertyType) {
+                addStringFilters(cxsPropertyType.name, eventTypeFilterInput);
+            } else if (cxsPropertyType instanceof CXSBooleanPropertyType) {
+                addBooleanFilters(cxsPropertyType.name, eventTypeFilterInput);
+            } else if (cxsPropertyType instanceof CXSIntPropertyType) {
+                addIntegerFilters(cxsPropertyType.name, eventTypeFilterInput);
+            } else if (cxsPropertyType instanceof CXSFloatPropertyType) {
+                addFloatFilters(cxsPropertyType.name, eventTypeFilterInput);
+            } else if (cxsPropertyType instanceof CXSGeoPointPropertyType) {
+                addDistanceFilters(cxsPropertyType.name, eventTypeFilterInput);
+            } else if (cxsPropertyType instanceof CXSDatePropertyType) {
+                addDateFilters(cxsPropertyType.name, eventTypeFilterInput);
+            } else if (cxsPropertyType instanceof CXSSetPropertyType) {
+                addSetFilters(cxsPropertyType.name, ((CXSSetPropertyType) cxsPropertyType).properties, eventTypeFilterInput);
+            }
+        }
+
+        registeredInputTypes.put(eventTypeName + "FilterInput", eventTypeFilterInput.build());
+
+        inputTypeBuilder.field(newInputObjectField()
+                .name(eventTypeName)
+                .type(registeredInputTypes.get(eventTypeName + "FilterInput"))
+        );
+
+    }
+
+    private void addIdentityFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
+        inputTypeBuilder.field(newInputObjectField()
+                .name(propertyName + "_equals")
+                .type(GraphQLString)
+        );
+    }
+
+    private void addStringFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
+        inputTypeBuilder.field(newInputObjectField()
+                .name(propertyName + "_equals")
+                .type(GraphQLString)
+        );
+        inputTypeBuilder.field(newInputObjectField()
+                .name(propertyName + "_regexp")
+                .type(GraphQLString)
+        );
+    }
+
+    private void addBooleanFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
+        inputTypeBuilder.field(newInputObjectField()
+                .name(propertyName + "_equals")
+                .type(GraphQLBoolean)
+        );
+    }
+
+    private void addIntegerFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
+        inputTypeBuilder.field(newInputObjectField()
+                .name(propertyName + "_equals")
+                .type(GraphQLInt)
+        );
+        inputTypeBuilder.field(newInputObjectField()
+                .name(propertyName + "_gt")
+                .type(GraphQLInt)
+        );
+        inputTypeBuilder.field(newInputObjectField()
+                .name(propertyName + "_gte")
+                .type(GraphQLInt)
+        );
+        inputTypeBuilder.field(newInputObjectField()
+                .name(propertyName + "_lt")
+                .type(GraphQLInt)
+        );
+        inputTypeBuilder.field(newInputObjectField()
+                .name(propertyName + "_lte")
+                .type(GraphQLInt)
+        );
+    }
+
+    private void addFloatFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
+        inputTypeBuilder.field(newInputObjectField()
+                .name(propertyName + "_equals")
+                .type(GraphQLFloat)
+        );
+        inputTypeBuilder.field(newInputObjectField()
+                .name(propertyName + "_gt")
+                .type(GraphQLFloat)
+        );
+        inputTypeBuilder.field(newInputObjectField()
+                .name(propertyName + "_gte")
+                .type(GraphQLFloat)
+        );
+        inputTypeBuilder.field(newInputObjectField()
+                .name(propertyName + "_lt")
+                .type(GraphQLFloat)
+        );
+        inputTypeBuilder.field(newInputObjectField()
+                .name(propertyName + "_lte")
+                .type(GraphQLFloat)
+        );
+    }
+
+    private void addDistanceFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
+        inputTypeBuilder.field(newInputObjectField()
+                .name(propertyName + "_distance")
+                .type(registeredInputTypes.get(CXSGeoDistanceInput.class.getName()))
+        );
+    }
+
+    private void addDateFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
+        inputTypeBuilder.field(newInputObjectField()
+                .name(propertyName + "_between")
+                .type(registeredInputTypes.get(CXSDateFilterInput.class.getName()))
+        );
+    }
+
+    private GraphQLInputType buildCXSEventFilterInputType() {
+        GraphQLInputObjectType.Builder cxsEventFilterInputType = newInputObject()
+                .name("CXS_EventFilterInput")
+                .description("Filter conditions for each event types and built-in properties")
+                .field(newInputObjectField()
+                        .name("and")
+                        .type(new GraphQLList(new GraphQLTypeReference("CXS_EventFilterInput")))
+                )
+                .field(newInputObjectField()
+                        .name("or")
+                        .type(new GraphQLList(new GraphQLTypeReference("CXS_EventFilterInput")))
+                )
+                .field(newInputObjectField()
+                        .name("properties")
+                        .type(registeredInputTypes.get("CXS_EventPropertiesFilterInput"))
+                )
+                .field(newInputObjectField()
+                        .name("eventOccurrence")
+                        .type(registeredInputTypes.get(CXSEventOccurrenceFilterInput.class.getName()))
+                );
+        return cxsEventFilterInputType.build();
+    }
+
     private GraphQLInputType buildCXSEventInputType() {
         GraphQLInputObjectType.Builder cxsEventInputType = newInputObject()
                 .name("CXS_EventInput")
@@ -201,6 +402,74 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                         .name("getEvent")
                         .description("Retrieves a specific event")
                 )
+                .field(newFieldDefinition()
+                        .type(new GraphQLList(registeredOutputTypes.get("CXS_EventConnection")))
+                        .name("findEvents")
+                        .argument(newArgument()
+                                .name("filter")
+                                .type(registeredInputTypes.get("CXS_EventFilterInput"))
+                        )
+                        .argument(newArgument()
+                                .name("orderBy")
+                                .type(registeredInputTypes.get(CXSOrderByInput.class.getName()))
+                        )
+                        .argument(newArgument()
+                                .name("first")
+                                .type(GraphQLInt)
+                                .description("Number of objects to retrieve starting at the after cursor position")
+                        )
+                        .argument(newArgument()
+                                .name("after")
+                                .type(GraphQLString)
+                                .description("Starting cursor location to retrieve the object from")
+                        )
+                        .argument(newArgument()
+                                .name("last")
+                                .type(GraphQLInt)
+                                .description("Number of objects to retrieve end at the before cursor position")
+                        )
+                        .argument(newArgument()
+                                .name("before")
+                                .type(GraphQLString)
+                                .description("End cursor location to retrieve the object from")
+                        )
+                        .description("Retrieves the events that match the specified filters")
+                )
+                /*
+                .field(newFieldDefinition()
+                        .type(new GraphQLList(registeredOutputTypes.get("CXS_ProfileConnection")))
+                        .name("findProfiles")
+                        .argument(newArgument()
+                                .name("filter")
+                                .type(registeredInputTypes.get("CXS_ProfileFilterInput"))
+                        )
+                        .argument(newArgument()
+                                .name("orderBy")
+                                .type(registeredInputTypes.get(CXSOrderByInput.class.getName()))
+                        )
+                        .argument(newArgument()
+                                .name("first")
+                                .type(GraphQLInt)
+                                .description("Number of objects to retrieve starting at the after cursor position")
+                        )
+                        .argument(newArgument()
+                                .name("after")
+                                .type(GraphQLString)
+                                .description("Starting cursor location to retrieve the object from")
+                        )
+                        .argument(newArgument()
+                                .name("last")
+                                .type(GraphQLInt)
+                                .description("Number of objects to retrieve end at the before cursor position")
+                        )
+                        .argument(newArgument()
+                                .name("before")
+                                .type(GraphQLString)
+                                .description("End cursor location to retrieve the object from")
+                        )
+                        .description("Retrieves the profiles that match the specified profiles")
+                )
+                */
                 .build();
     }
 


[unomi] 10/15: 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

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit ab68e034da0d6365806899a387979c04b647bff9
Author: Serge Huber <sh...@apache.org>
AuthorDate: Fri Jul 27 22:12:41 2018 +0200

    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 <sh...@apache.org>
---
 .../java/org/apache/unomi/graphql/CXSQuery.java    |  6 +++
 .../unomi/graphql/builders/CXSBuildersUtils.java   | 52 ++++++++++++++++++++++
 .../unomi/graphql/builders/CXSEventBuilders.java   | 24 ++--------
 .../graphql/internal/CXSGraphQLProviderImpl.java   | 24 ++++------
 4 files changed, 70 insertions(+), 36 deletions(-)

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<CXSEventType> getEventTypes() {
         return new ArrayList<>();
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 0000000..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) annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(annotatedClass, container)).getFieldDefinitions());
+    }
+
+}
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
index f5e5777..ff2a27e 100644
--- 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
@@ -19,10 +19,7 @@ package org.apache.unomi.graphql.builders;
 import graphql.annotations.processor.GraphQLAnnotationsComponent;
 import graphql.annotations.processor.ProcessingElementsContainer;
 import graphql.schema.*;
-import org.apache.unomi.graphql.CXSEvent;
-import org.apache.unomi.graphql.CXSEventOccurrenceFilterInput;
-import org.apache.unomi.graphql.CXSEventType;
-import org.apache.unomi.graphql.PageInfo;
+import org.apache.unomi.graphql.*;
 import org.apache.unomi.graphql.propertytypes.*;
 
 import java.util.ArrayList;
@@ -276,13 +273,8 @@ public class CXSEventBuilders implements CXSBuilder {
     }
 
     private GraphQLInputType buildCXSEventInputType() {
-        GraphQLInputObjectType.Builder cxsEventInputType = newInputObject()
-                .name("CXS_EventInput")
-                .description("The event input object to send events to the Context Server")
-                .field(newInputObjectField()
-                        .name("id")
-                        .type(GraphQLID)
-                );
+        GraphQLInputObjectType.Builder cxsEventInputType = CXSBuildersUtils.getInputBuilderFromAnnotatedClass(annotationsComponent, container, "CXS_EventInput", CXSEventInput.class)
+                .description("The event input object to send events to the Context Server");
 
         for (Map.Entry<String,CXSEventType> cxsEventTypeEntry : eventTypes.entrySet()) {
             CXSEventType cxsEventType = cxsEventTypeEntry.getValue();
@@ -414,17 +406,9 @@ public class CXSEventBuilders implements CXSBuilder {
     }
 
     private GraphQLOutputType buildCXSEventPropertiesOutputType() {
-        GraphQLObjectType.Builder eventPropertiesOutputType = newObject()
-                .name("CXS_EventProperties")
+        GraphQLObjectType.Builder eventPropertiesOutputType = CXSBuildersUtils.getOutputBuilderFromAnnotatedClass(annotationsComponent, container, "CXS_EventProperties", CXSEventProperties.class)
                 .description("All possible properties of an event");
 
-        // we create a dummy field because GraphQL requires at least one
-        eventPropertiesOutputType.field(newFieldDefinition()
-                .type(GraphQLInt)
-                .name("typeCount")
-                .description("Total count of different field types")
-        );
-
         for (Map.Entry<String,CXSEventType> cxsEventTypeEntry : eventTypes.entrySet()) {
             CXSEventType cxsEventType = cxsEventTypeEntry.getValue();
             eventPropertiesOutputType
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 a67cace..5880731 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
@@ -66,9 +66,7 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
     }
 
     public void updateGraphQLTypes() {
-
-        Map<String,GraphQLType> typeRegistry = container.getTypeRegistry();
-
+        typeRegistry.clear();
         typeRegistry.put(PageInfo.class.getName(), annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(PageInfo.class, container));
 
         typeRegistry.put("CXS_GeoPoint", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSGeoPoint.class, container));
@@ -80,18 +78,13 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
         typeRegistry.put("CXS_EventTypeInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSEventTypeInput.class, container));
         typeRegistry.put("CXS_OrderByInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSOrderByInput.class, container));
 
+        cxsEventBuilders.updateTypes();
+
         typeRegistry.put("CXS_Query", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSQuery.class, container));
         typeRegistry.put("CXS_Mutation", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSMutation.class, container));
 
-        cxsEventBuilders.updateTypes();
-
     }
 
-    private GraphQLObjectType.Builder getBuilderFromAnnotatedClass(Class annotatedClass) {
-        return GraphQLObjectType.newObject()
-                .name(annotatedClass.getName())
-                .fields(((GraphQLObjectType) annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(annotatedClass, container)).getFieldDefinitions());
-    }
 
     private GraphQLOutputType getOutputTypeFromRegistry(String typeName) {
         return (GraphQLOutputType) typeRegistry.get(typeName);
@@ -108,17 +101,16 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
     @Override
     public Collection<GraphQLFieldDefinition> getQueries() {
         List<GraphQLFieldDefinition> fieldDefinitions = new ArrayList<GraphQLFieldDefinition>();
+        final CXSGraphQLProvider cxsGraphQLProvider = this;
         fieldDefinitions.add(newFieldDefinition()
                 .type(getOutputTypeFromRegistry("CXS_Query"))
                 .name("cxs")
                 .description("Root field for all CXS queries")
-                /*
-                .dataFetcher(new DataFetcher() {
-                    public Object get(DataFetchingEnvironment environment) {
-                        Map<String,Object> map = environment.getContext();
-                        return map.keySet();
+                .dataFetcher(new DataFetcher<CXSGraphQLProvider>() {
+                    public CXSGraphQLProvider get(DataFetchingEnvironment environment) {
+                        return cxsGraphQLProvider;
                     }
-                })*/.build());
+                }).build());
         return fieldDefinitions;
     }
 


[unomi] 12/15: UNOMI-180 Implement CXS GraphQL API - Rename CXS to CDP

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit 29faaee52554921b4650b7fc199f79e20cae8644
Author: Serge Huber <sh...@apache.org>
AuthorDate: Mon Nov 19 18:17:11 2018 +0100

    UNOMI-180 Implement CXS GraphQL API
    - Rename CXS to CDP
    
    Signed-off-by: Serge Huber <sh...@apache.org>
---
 graphql/cxs-impl/pom.xml                           |   6 +-
 ...raphQLProvider.java => CDPGraphQLProvider.java} |  10 +-
 .../java/org/apache/unomi/graphql/CDPMutation.java | 128 +++++++++++
 ...Filter.java => CDPProfilePropertiesFilter.java} |   8 +-
 ...roviderManager.java => CDPProviderManager.java} |   2 +-
 .../unomi/graphql/{CXSQuery.java => CDPQuery.java} |  60 ++---
 .../java/org/apache/unomi/graphql/CXSMutation.java | 127 ----------
 .../builders/{CXSBuilder.java => CDPBuilder.java}  |   2 +-
 ...CXSBuildersUtils.java => CDPBuildersUtils.java} |   2 +-
 ...CXSEventBuilders.java => CDPEventBuilders.java} | 256 ++++++++++-----------
 ...oviderImpl.java => CDPGraphQLProviderImpl.java} | 122 +++++-----
 ...anagerImpl.java => CDPProviderManagerImpl.java} |  22 +-
 ...opertyType.java => CDPBooleanPropertyType.java} |   8 +-
 ...ePropertyType.java => CDPDatePropertyType.java} |   6 +-
 ...PropertyType.java => CDPFloatPropertyType.java} |   6 +-
 ...pertyType.java => CDPGeoPointPropertyType.java} |   6 +-
 ...rtyType.java => CDPIdentifierPropertyType.java} |   6 +-
 ...ntPropertyType.java => CDPIntPropertyType.java} |   6 +-
 .../{CXSPropertyType.java => CDPPropertyType.java} |   8 +-
 ...etPropertyType.java => CDPSetPropertyType.java} |  12 +-
 ...ropertyType.java => CDPStringPropertyType.java} |   6 +-
 .../{CXSDateFilter.java => CDPDateFilter.java}     |   4 +-
 .../{CXSEventFilter.java => CDPEventFilter.java}   |   8 +-
 .../{CXSEventInput.java => CDPEventInput.java}     |   8 +-
 ...put.java => CDPEventOccurrenceFilterInput.java} |   4 +-
 ...SEventTypeInput.java => CDPEventTypeInput.java} |  12 +-
 ...DistanceInput.java => CDPGeoDistanceInput.java} |  12 +-
 ...CXSGeoPointInput.java => CDPGeoPointInput.java} |   4 +-
 .../{CXSOrderByInput.java => CDPOrderByInput.java} |   8 +-
 ...rtyTypeInput.java => CDPPropertyTypeInput.java} |  38 +--
 ...FilterInput.java => CDPSegmentFilterInput.java} |   8 +-
 ...TypeInput.java => CDPSetPropertyTypeInput.java} |  13 +-
 .../types/output/{CXSEvent.java => CDPEvent.java}  |  12 +-
 ...ventConnection.java => CDPEventConnection.java} |   6 +-
 .../{CXSEventEdge.java => CDPEventEdge.java}       |   6 +-
 .../{CXSEventFilter.java => CDPEventFilter.java}   |   8 +-
 ...ceFilter.java => CDPEventOccurrenceFilter.java} |   6 +-
 ...ventProperties.java => CDPEventProperties.java} |   4 +-
 ...esFilter.java => CDPEventPropertiesFilter.java} |   4 +-
 .../{CXSEventType.java => CDPEventType.java}       |  14 +-
 ...eoDistanceUnit.java => CDPGeoDistanceUnit.java} |   4 +-
 .../output/{CXSGeoPoint.java => CDPGeoPoint.java}  |   4 +-
 .../output/{CXSSegment.java => CDPSegment.java}    |   8 +-
 ...mentCondition.java => CDPSegmentCondition.java} |  10 +-
 ...ntConnection.java => CDPSegmentConnection.java} |   6 +-
 .../{CXSSegmentEdge.java => CDPSegmentEdge.java}   |   6 +-
 .../{CXSSortOrder.java => CDPSortOrder.java}       |   4 +-
 .../types/output/{CXSView.java => CDPView.java}    |   4 +-
 48 files changed, 518 insertions(+), 516 deletions(-)

diff --git a/graphql/cxs-impl/pom.xml b/graphql/cxs-impl/pom.xml
index 22a1edd..af951ca 100644
--- a/graphql/cxs-impl/pom.xml
+++ b/graphql/cxs-impl/pom.xml
@@ -25,9 +25,9 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>cxs-graphql-api-impl</artifactId>
-    <name>Apache Unomi :: GraphQL API :: CXS Implementation</name>
-    <description>Apache Unomi Context GraphQL API CXS Implementation</description>
+    <artifactId>cdp-graphql-api-impl</artifactId>
+    <name>Apache Unomi :: GraphQL API :: CDP Implementation</name>
+    <description>Apache Unomi Context GraphQL API CDP Implementation</description>
     <packaging>bundle</packaging>
 
     <dependencies>
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CDPGraphQLProvider.java
similarity index 77%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CDPGraphQLProvider.java
index f5a62a3..ed67d71 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CDPGraphQLProvider.java
@@ -16,15 +16,15 @@
  */
 package org.apache.unomi.graphql;
 
-import org.apache.unomi.graphql.types.output.CXSEventType;
+import org.apache.unomi.graphql.types.output.CDPEventType;
 
 import java.util.Map;
 
-public interface CXSGraphQLProvider {
+public interface CDPGraphQLProvider {
 
-    Map<String, CXSEventType> getEventTypes();
-    CXSProviderManager getCxsProviderManager();
+    Map<String, CDPEventType> getEventTypes();
+    CDPProviderManager getCdpProviderManager();
     void updateGraphQLTypes();
-    void setCxsProviderManager(CXSProviderManager cxsProviderManager);
+    void setCdpProviderManager(CDPProviderManager cdpProviderManager);
 
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CDPMutation.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CDPMutation.java
new file mode 100644
index 0000000..fd72f84
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CDPMutation.java
@@ -0,0 +1,128 @@
+/*
+ * 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;
+import graphql.schema.DataFetchingEnvironment;
+import org.apache.unomi.graphql.propertytypes.CDPIdentifierPropertyType;
+import org.apache.unomi.graphql.propertytypes.CDPPropertyType;
+import org.apache.unomi.graphql.propertytypes.CDPSetPropertyType;
+import org.apache.unomi.graphql.propertytypes.CDPStringPropertyType;
+import org.apache.unomi.graphql.types.input.CDPEventInput;
+import org.apache.unomi.graphql.types.input.CDPEventTypeInput;
+import org.apache.unomi.graphql.types.input.CDPPropertyTypeInput;
+import org.apache.unomi.graphql.types.input.CDPSetPropertyTypeInput;
+import org.apache.unomi.graphql.types.output.CDPEventType;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@GraphQLName("CDP_Mutation")
+public class CDPMutation {
+
+    CDPGraphQLProvider cdpGraphQLProvider;
+
+    public CDPMutation(CDPGraphQLProvider cdpGraphQLProvider) {
+        this.cdpGraphQLProvider = cdpGraphQLProvider;
+    }
+
+    @GraphQLField
+    public CDPEventType createOrUpdateEventType(DataFetchingEnvironment env, @GraphQLName("eventType") CDPEventTypeInput cdpEventTypeInput) {
+
+        CDPEventType cdpEventType = new CDPEventType(cdpEventTypeInput.getId(), cdpEventTypeInput.getScope(), cdpEventTypeInput.getTypeName(), new ArrayList<>());
+        for (CDPPropertyTypeInput propertyTypeInput : cdpEventTypeInput.getProperties()) {
+            CDPPropertyType propertyType = getPropertyType(propertyTypeInput);
+            cdpEventType.getProperties().add(propertyType);
+        }
+        cdpGraphQLProvider.getEventTypes().put(cdpEventType.getTypeName(), cdpEventType);
+        cdpGraphQLProvider.updateGraphQLTypes();
+        if (cdpGraphQLProvider.getCdpProviderManager() != null) {
+            cdpGraphQLProvider.getCdpProviderManager().refreshProviders();
+        }
+        return cdpEventType;
+
+    }
+
+    @GraphQLField
+    public int processEvents(DataFetchingEnvironment env, @GraphQLName("events") List<CDPEventInput> events) {
+        return 0;
+    }
+
+    private CDPPropertyType getPropertyType(CDPPropertyTypeInput cdpPropertyTypeInput) {
+        CDPPropertyType propertyType = null;
+        if (cdpPropertyTypeInput.identifierPropertyTypeInput != null) {
+            propertyType = getIdentifierPropertyType(cdpPropertyTypeInput.identifierPropertyTypeInput);
+        } else if (cdpPropertyTypeInput.stringPropertyTypeInput != null) {
+            propertyType = getStringPropertyType(cdpPropertyTypeInput.stringPropertyTypeInput);
+        } else if (cdpPropertyTypeInput.setPropertyTypeInput != null) {
+            propertyType = getSetPropertyType(cdpPropertyTypeInput.setPropertyTypeInput);
+        }
+        return propertyType;
+    }
+
+    private CDPPropertyType getSetPropertyType(CDPSetPropertyTypeInput cdpSetPropertyTypeInput) {
+        List<CDPPropertyType> setProperties = null;
+        if (cdpSetPropertyTypeInput.getProperties() != null) {
+            setProperties = new ArrayList<>();
+            for (CDPPropertyTypeInput setProperty : cdpSetPropertyTypeInput.getProperties()) {
+                CDPPropertyType subPropertyType = getPropertyType(setProperty);
+                if (subPropertyType != null) {
+                    setProperties.add(subPropertyType);
+                }
+            }
+        }
+        return new CDPSetPropertyType(
+                cdpSetPropertyTypeInput.getId(),
+                cdpSetPropertyTypeInput.getName(),
+                cdpSetPropertyTypeInput.getMinOccurrences(),
+                cdpSetPropertyTypeInput.getMaxOccurrences(),
+                cdpSetPropertyTypeInput.getTags(),
+                cdpSetPropertyTypeInput.getSystemTags(),
+                cdpSetPropertyTypeInput.isPersonalData(),
+                setProperties);
+    }
+
+    private CDPPropertyType getStringPropertyType(CDPStringPropertyType stringPropertyType) {
+        return new CDPStringPropertyType(
+                stringPropertyType.getId(),
+                stringPropertyType.getName(),
+                stringPropertyType.getMinOccurrences(),
+                stringPropertyType.getMaxOccurrences(),
+                stringPropertyType.getTags(),
+                stringPropertyType.getSystemTags(),
+                stringPropertyType.isPersonalData(),
+                stringPropertyType.getRegexp(),
+                stringPropertyType.getDefaultValue()
+                );
+    }
+
+    private CDPPropertyType getIdentifierPropertyType(CDPIdentifierPropertyType identifierPropertyType) {
+        return new CDPIdentifierPropertyType(
+                identifierPropertyType.getId(),
+                identifierPropertyType.getName(),
+                identifierPropertyType.getMinOccurrences(),
+                identifierPropertyType.getMaxOccurrences(),
+                identifierPropertyType.getTags(),
+                identifierPropertyType.getSystemTags(),
+                identifierPropertyType.isPersonalData(),
+                identifierPropertyType.getRegexp(),
+                identifierPropertyType.getDefaultValue()
+        );
+    }
+
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProfilePropertiesFilter.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CDPProfilePropertiesFilter.java
similarity index 84%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProfilePropertiesFilter.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CDPProfilePropertiesFilter.java
index ff005af..f7b4d4a 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProfilePropertiesFilter.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CDPProfilePropertiesFilter.java
@@ -21,15 +21,15 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_ProfilePropertiesFilter")
-public class CXSProfilePropertiesFilter {
+@GraphQLName("CDP_ProfilePropertiesFilter")
+public class CDPProfilePropertiesFilter {
 
     @GraphQLField
     @GraphQLName("and")
-    public List<CXSProfilePropertiesFilter> andFilters;
+    public List<CDPProfilePropertiesFilter> andFilters;
 
     @GraphQLField
     @GraphQLName("or")
-    public List<CXSProfilePropertiesFilter> orFilters;
+    public List<CDPProfilePropertiesFilter> orFilters;
 
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CDPProviderManager.java
similarity index 96%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CDPProviderManager.java
index 66d4d93..7024733 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CDPProviderManager.java
@@ -18,7 +18,7 @@ package org.apache.unomi.graphql;
 
 import org.apache.unomi.api.services.SegmentService;
 
-public interface CXSProviderManager {
+public interface CDPProviderManager {
 
     void refreshProviders();
 
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/CDPQuery.java
similarity index 60%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSQuery.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CDPQuery.java
index 728bb38..2d88bc4 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/CDPQuery.java
@@ -23,74 +23,74 @@ import org.apache.unomi.api.conditions.Condition;
 import org.apache.unomi.api.query.Query;
 import org.apache.unomi.api.segments.Segment;
 import org.apache.unomi.api.services.SegmentService;
-import org.apache.unomi.graphql.types.input.CXSEventFilter;
-import org.apache.unomi.graphql.types.input.CXSOrderByInput;
-import org.apache.unomi.graphql.types.input.CXSSegmentFilterInput;
+import org.apache.unomi.graphql.types.input.CDPEventFilter;
+import org.apache.unomi.graphql.types.input.CDPOrderByInput;
+import org.apache.unomi.graphql.types.input.CDPSegmentFilterInput;
 import org.apache.unomi.graphql.types.output.*;
 
 import java.util.ArrayList;
 import java.util.List;
 
-@GraphQLName("CXS_Query")
-public class CXSQuery {
+@GraphQLName("CDP_Query")
+public class CDPQuery {
 
-    CXSGraphQLProvider cxsGraphQLProvider;
+    CDPGraphQLProvider cdpGraphQLProvider;
 
-    public CXSQuery(CXSGraphQLProvider cxsGraphQLProvider) {
-        this.cxsGraphQLProvider = cxsGraphQLProvider;
+    public CDPQuery(CDPGraphQLProvider cdpGraphQLProvider) {
+        this.cdpGraphQLProvider = cdpGraphQLProvider;
     }
 
     @GraphQLField
-    public List<CXSEventType> getEventTypes() {
+    public List<CDPEventType> getEventTypes() {
         return new ArrayList<>();
     }
 
     @GraphQLField
-    public CXSEvent getEvent(@GraphQLName("id") String id) {
-        return new CXSEvent();
+    public CDPEvent getEvent(@GraphQLName("id") String id) {
+        return new CDPEvent();
     }
 
     @GraphQLField
-    public CXSEventConnection findEvents(@GraphQLName("filter") CXSEventFilter filter,
-                                         @GraphQLName("orderBy") CXSOrderByInput orderBy,
+    public CDPEventConnection findEvents(@GraphQLName("filter") CDPEventFilter filter,
+                                         @GraphQLName("orderBy") CDPOrderByInput orderBy,
                                          DataFetchingEnvironment env) {
         env.getArgument("first");
         env.getArgument("after");
-        return new CXSEventConnection();
+        return new CDPEventConnection();
     }
 
     @GraphQLField
-    public CXSSegmentConnection findSegments(@GraphQLName("filter") CXSSegmentFilterInput filter,
-                                             @GraphQLName("orderBy") CXSOrderByInput orderBy,
+    public CDPSegmentConnection findSegments(@GraphQLName("filter") CDPSegmentFilterInput filter,
+                                             @GraphQLName("orderBy") CDPOrderByInput orderBy,
                                              DataFetchingEnvironment env) {
-        SegmentService segmentService = cxsGraphQLProvider.getCxsProviderManager().getSegmentService();
+        SegmentService segmentService = cdpGraphQLProvider.getCdpProviderManager().getSegmentService();
         Query query = new Query();
         segmentService.getSegmentMetadatas(query);
-        return new CXSSegmentConnection();
+        return new CDPSegmentConnection();
     }
 
     @GraphQLField
-    public CXSSegment getSegment(@GraphQLName("segmentId") String segmentId) {
-        SegmentService segmentService = cxsGraphQLProvider.getCxsProviderManager().getSegmentService();
+    public CDPSegment getSegment(@GraphQLName("segmentId") String segmentId) {
+        SegmentService segmentService = cdpGraphQLProvider.getCdpProviderManager().getSegmentService();
         Segment segment = segmentService.getSegmentDefinition(segmentId);
         if (segment == null) {
             return null;
         }
-        CXSSegment cxsSegment = new CXSSegment();
-        cxsSegment.id = segment.getItemId();
-        cxsSegment.name = segment.getMetadata().getName();
-        CXSView cxsView = new CXSView();
-        cxsView.name = segment.getScope();
-        cxsSegment.view = cxsView;
-        cxsSegment.condition = getSegmentCondition(segment.getCondition());
-        return cxsSegment;
+        CDPSegment cdpSegment = new CDPSegment();
+        cdpSegment.id = segment.getItemId();
+        cdpSegment.name = segment.getMetadata().getName();
+        CDPView cdpView = new CDPView();
+        cdpView.name = segment.getScope();
+        cdpSegment.view = cdpView;
+        cdpSegment.condition = getSegmentCondition(segment.getCondition());
+        return cdpSegment;
     }
 
-    private CXSSegmentCondition getSegmentCondition(Condition segmentRootCondition) {
+    private CDPSegmentCondition getSegmentCondition(Condition segmentRootCondition) {
         if (segmentRootCondition == null) {
             return null;
         }
-        // @todo translate the conditions into something that the CXS spec can work with.
+        // @todo translate the conditions into something that the CDP spec can work with.
 
         // we probably have to scan the tree to find any event conditions and seperate them
         // from the profile property conditions (what about session conditions ?)
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java
deleted file mode 100644
index f7cb1e1..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java
+++ /dev/null
@@ -1,127 +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;
-import graphql.schema.DataFetchingEnvironment;
-import org.apache.unomi.graphql.propertytypes.CXSIdentifierPropertyType;
-import org.apache.unomi.graphql.propertytypes.CXSSetPropertyType;
-import org.apache.unomi.graphql.propertytypes.CXSStringPropertyType;
-import org.apache.unomi.graphql.types.input.CXSEventInput;
-import org.apache.unomi.graphql.types.input.CXSEventTypeInput;
-import org.apache.unomi.graphql.types.input.CXSPropertyTypeInput;
-import org.apache.unomi.graphql.types.input.CXSSetPropertyTypeInput;
-import org.apache.unomi.graphql.types.output.CXSEventType;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@GraphQLName("CXS_Mutation")
-public class CXSMutation {
-
-    CXSGraphQLProvider cxsGraphQLProvider;
-
-    public CXSMutation(CXSGraphQLProvider cxsGraphQLProvider) {
-        this.cxsGraphQLProvider = cxsGraphQLProvider;
-    }
-
-    @GraphQLField
-    public CXSEventType createOrUpdateEventType(DataFetchingEnvironment env, @GraphQLName("eventType") CXSEventTypeInput cxsEventTypeInput) {
-
-        CXSEventType cxsEventType = new CXSEventType(cxsEventTypeInput.getId(), cxsEventTypeInput.getScope(), cxsEventTypeInput.getTypeName(), new ArrayList<>());
-        for (CXSPropertyTypeInput propertyTypeInput : cxsEventTypeInput.getProperties()) {
-            org.apache.unomi.graphql.propertytypes.CXSPropertyType propertyType = getPropertyType(propertyTypeInput);
-            cxsEventType.getProperties().add(propertyType);
-        }
-        cxsGraphQLProvider.getEventTypes().put(cxsEventType.getTypeName(), cxsEventType);
-        cxsGraphQLProvider.updateGraphQLTypes();
-        if (cxsGraphQLProvider.getCxsProviderManager() != null) {
-            cxsGraphQLProvider.getCxsProviderManager().refreshProviders();
-        }
-        return cxsEventType;
-
-    }
-
-    @GraphQLField
-    public int processEvents(DataFetchingEnvironment env, @GraphQLName("events") List<CXSEventInput> events) {
-        return 0;
-    }
-
-    private org.apache.unomi.graphql.propertytypes.CXSPropertyType getPropertyType(CXSPropertyTypeInput cxsPropertyTypeInput) {
-        org.apache.unomi.graphql.propertytypes.CXSPropertyType propertyType = null;
-        if (cxsPropertyTypeInput.identifierPropertyTypeInput != null) {
-            propertyType = getIdentifierPropertyType(cxsPropertyTypeInput.identifierPropertyTypeInput);
-        } else if (cxsPropertyTypeInput.stringPropertyTypeInput != null) {
-            propertyType = getStringPropertyType(cxsPropertyTypeInput.stringPropertyTypeInput);
-        } else if (cxsPropertyTypeInput.setPropertyTypeInput != null) {
-            propertyType = getSetPropertyType(cxsPropertyTypeInput.setPropertyTypeInput);
-        }
-        return propertyType;
-    }
-
-    private org.apache.unomi.graphql.propertytypes.CXSPropertyType getSetPropertyType(CXSSetPropertyTypeInput cxsSetPropertyTypeInput) {
-        List<org.apache.unomi.graphql.propertytypes.CXSPropertyType> setProperties = null;
-        if (cxsSetPropertyTypeInput.getProperties() != null) {
-            setProperties = new ArrayList<>();
-            for (CXSPropertyTypeInput setProperty : cxsSetPropertyTypeInput.getProperties()) {
-                org.apache.unomi.graphql.propertytypes.CXSPropertyType subPropertyType = getPropertyType(setProperty);
-                if (subPropertyType != null) {
-                    setProperties.add(subPropertyType);
-                }
-            }
-        }
-        return new CXSSetPropertyType(
-                cxsSetPropertyTypeInput.getId(),
-                cxsSetPropertyTypeInput.getName(),
-                cxsSetPropertyTypeInput.getMinOccurrences(),
-                cxsSetPropertyTypeInput.getMaxOccurrences(),
-                cxsSetPropertyTypeInput.getTags(),
-                cxsSetPropertyTypeInput.getSystemTags(),
-                cxsSetPropertyTypeInput.isPersonalData(),
-                setProperties);
-    }
-
-    private org.apache.unomi.graphql.propertytypes.CXSPropertyType getStringPropertyType(CXSStringPropertyType stringPropertyType) {
-        return new CXSStringPropertyType(
-                stringPropertyType.getId(),
-                stringPropertyType.getName(),
-                stringPropertyType.getMinOccurrences(),
-                stringPropertyType.getMaxOccurrences(),
-                stringPropertyType.getTags(),
-                stringPropertyType.getSystemTags(),
-                stringPropertyType.isPersonalData(),
-                stringPropertyType.getRegexp(),
-                stringPropertyType.getDefaultValue()
-                );
-    }
-
-    private org.apache.unomi.graphql.propertytypes.CXSPropertyType getIdentifierPropertyType(CXSIdentifierPropertyType identifierPropertyType) {
-        return new CXSIdentifierPropertyType(
-                identifierPropertyType.getId(),
-                identifierPropertyType.getName(),
-                identifierPropertyType.getMinOccurrences(),
-                identifierPropertyType.getMaxOccurrences(),
-                identifierPropertyType.getTags(),
-                identifierPropertyType.getSystemTags(),
-                identifierPropertyType.isPersonalData(),
-                identifierPropertyType.getRegexp(),
-                identifierPropertyType.getDefaultValue()
-        );
-    }
-
-}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSBuilder.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CDPBuilder.java
similarity index 96%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSBuilder.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CDPBuilder.java
index 83c7a85..a8350f8 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSBuilder.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CDPBuilder.java
@@ -16,7 +16,7 @@
  */
 package org.apache.unomi.graphql.builders;
 
-public interface CXSBuilder {
+public interface CDPBuilder {
 
     void updateTypes();
 
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/CDPBuildersUtils.java
similarity index 98%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSBuildersUtils.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CDPBuildersUtils.java
index 3d9c586..f353d6c 100644
--- 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/CDPBuildersUtils.java
@@ -21,7 +21,7 @@ import graphql.annotations.processor.ProcessingElementsContainer;
 import graphql.schema.GraphQLInputObjectType;
 import graphql.schema.GraphQLObjectType;
 
-public class CXSBuildersUtils {
+public class CDPBuildersUtils {
 
     public static GraphQLObjectType.Builder getOutputBuilderFromAnnotatedClass(
             GraphQLAnnotationsComponent annotationsComponent,
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/CDPEventBuilders.java
similarity index 64%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSEventBuilders.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CDPEventBuilders.java
index 8c616d4..a5a8fc7 100644
--- 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/CDPEventBuilders.java
@@ -20,11 +20,11 @@ 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.input.CDPEventInput;
+import org.apache.unomi.graphql.types.input.CDPEventOccurrenceFilterInput;
+import org.apache.unomi.graphql.types.output.CDPEvent;
+import org.apache.unomi.graphql.types.output.CDPEventProperties;
+import org.apache.unomi.graphql.types.output.CDPEventType;
 import org.apache.unomi.graphql.types.output.PageInfo;
 
 import java.util.ArrayList;
@@ -37,16 +37,16 @@ import static graphql.schema.GraphQLInputObjectField.newInputObjectField;
 import static graphql.schema.GraphQLInputObjectType.newInputObject;
 import static graphql.schema.GraphQLObjectType.newObject;
 
-public class CXSEventBuilders implements CXSBuilder {
+public class CDPEventBuilders implements CDPBuilder {
 
     private GraphQLAnnotationsComponent annotationsComponent;
     private ProcessingElementsContainer container;
-    private Map<String, CXSEventType> eventTypes;
+    private Map<String, CDPEventType> eventTypes;
     private Map<String,GraphQLType> typeRegistry;
 
-    public CXSEventBuilders(GraphQLAnnotationsComponent annotationsComponent,
+    public CDPEventBuilders(GraphQLAnnotationsComponent annotationsComponent,
                             ProcessingElementsContainer container,
-                            Map<String, CXSEventType> eventTypes) {
+                            Map<String, CDPEventType> eventTypes) {
         this.annotationsComponent = annotationsComponent;
         this.container = container;
         this.eventTypes = eventTypes;
@@ -56,23 +56,23 @@ public class CXSEventBuilders implements CXSBuilder {
     @Override
     public void updateTypes() {
         Map<String,GraphQLType> 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());
+        typeRegistry.put("CDP_EventInput", buildCDPEventInputType());
+        typeRegistry.put("CDP_EventOccurrenceFilterInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CDPEventOccurrenceFilterInput.class, container));
+        typeRegistry.put("CDP_EventPropertiesFilterInput", buildCDPEventPropertiesFilterInput());
+        typeRegistry.put("CDP_EventFilterInput", buildCDPEventFilterInputType());
+        typeRegistry.put("CDP_EventProperties", buildCDPEventPropertiesOutputType());
+        typeRegistry.put("CDP_Event", buildCDPEventOutputType());
+        typeRegistry.put("CDP_EventEdge", buildCDPEventEdgeOutputType());
+        typeRegistry.put("CDP_EventConnection", buildCDPEventConnectionOutputType());
     }
 
-    private GraphQLOutputType buildCXSEventEdgeOutputType() {
+    private GraphQLOutputType buildCDPEventEdgeOutputType() {
         return newObject()
-                .name("CXS_EventEdge")
-                .description("The Relay edge type for the CXS_Event output type")
+                .name("CDP_EventEdge")
+                .description("The Relay edge type for the CDP_Event output type")
                 .field(newFieldDefinition()
                         .name("node")
-                        .type((GraphQLOutputType) typeRegistry.get("CXS_Event"))
+                        .type((GraphQLOutputType) typeRegistry.get("CDP_Event"))
                 )
                 .field(newFieldDefinition()
                         .name("cursor")
@@ -81,13 +81,13 @@ public class CXSEventBuilders implements CXSBuilder {
                 .build();
     }
 
-    private GraphQLOutputType buildCXSEventConnectionOutputType() {
+    private GraphQLOutputType buildCDPEventConnectionOutputType() {
         return newObject()
-                .name("CXS_EventConnection")
-                .description("The Relay connection type for the CXS_Event output type")
+                .name("CDP_EventConnection")
+                .description("The Relay connection type for the CDP_Event output type")
                 .field(newFieldDefinition()
                         .name("edges")
-                        .type(new GraphQLList(typeRegistry.get("CXS_EventEdge")))
+                        .type(new GraphQLList(typeRegistry.get("CDP_EventEdge")))
                 )
                 .field(newFieldDefinition()
                         .name("pageInfo")
@@ -96,55 +96,55 @@ public class CXSEventBuilders implements CXSBuilder {
                 .build();
     }
 
-    private GraphQLInputType buildCXSEventPropertiesFilterInput() {
-        GraphQLInputObjectType.Builder cxsEventPropertiesFilterInput = newInputObject()
-                .name("CXS_EventPropertiesFilterInput")
+    private GraphQLInputType buildCDPEventPropertiesFilterInput() {
+        GraphQLInputObjectType.Builder cdpEventPropertiesFilterInput = newInputObject()
+                .name("CDP_EventPropertiesFilterInput")
                 .description("Filter conditions for each event types and built-in properties");
 
-        generateEventPropertiesFilters(cxsEventPropertiesFilterInput);
-        generateEventTypesFilters(cxsEventPropertiesFilterInput);
+        generateEventPropertiesFilters(cdpEventPropertiesFilterInput);
+        generateEventTypesFilters(cdpEventPropertiesFilterInput);
 
-        return cxsEventPropertiesFilterInput.build();
+        return cdpEventPropertiesFilterInput.build();
     }
 
 
-    private void generateEventPropertiesFilters(GraphQLInputObjectType.Builder cxsEventPropertiesFilterInput) {
-        addIdentityFilters("id", cxsEventPropertiesFilterInput);
-        addIdentityFilters("sourceId", cxsEventPropertiesFilterInput);
-        addIdentityFilters("clientId", cxsEventPropertiesFilterInput);
-        addIdentityFilters("profileId", cxsEventPropertiesFilterInput);
-        addDistanceFilters("location", cxsEventPropertiesFilterInput);
-        addDateFilters("timestamp", cxsEventPropertiesFilterInput);
+    private void generateEventPropertiesFilters(GraphQLInputObjectType.Builder cdpEventPropertiesFilterInput) {
+        addIdentityFilters("id", cdpEventPropertiesFilterInput);
+        addIdentityFilters("sourceId", cdpEventPropertiesFilterInput);
+        addIdentityFilters("clientId", cdpEventPropertiesFilterInput);
+        addIdentityFilters("profileId", cdpEventPropertiesFilterInput);
+        addDistanceFilters("location", cdpEventPropertiesFilterInput);
+        addDateFilters("timestamp", cdpEventPropertiesFilterInput);
     }
 
-    private void generateEventTypesFilters(GraphQLInputObjectType.Builder cxsEventPropertiesFilterInput) {
-        for (Map.Entry<String,CXSEventType> eventTypeEntry : eventTypes.entrySet()) {
-            addSetFilters(eventTypeEntry.getKey(), eventTypeEntry.getValue().getProperties(), cxsEventPropertiesFilterInput);
+    private void generateEventTypesFilters(GraphQLInputObjectType.Builder cdpEventPropertiesFilterInput) {
+        for (Map.Entry<String, CDPEventType> eventTypeEntry : eventTypes.entrySet()) {
+            addSetFilters(eventTypeEntry.getKey(), eventTypeEntry.getValue().getProperties(), cdpEventPropertiesFilterInput);
         }
     }
 
-    private void addSetFilters(String eventTypeName, List<CXSPropertyType> properties, GraphQLInputObjectType.Builder inputTypeBuilder) {
+    private void addSetFilters(String eventTypeName, List<CDPPropertyType> properties, GraphQLInputObjectType.Builder inputTypeBuilder) {
         GraphQLInputObjectType.Builder eventTypeFilterInput = newInputObject()
                 .name(eventTypeName + "FilterInput")
                 .description("Auto-generated filter input type for event type " + eventTypeName);
 
-        for (CXSPropertyType cxsPropertyType : properties) {
-            if (cxsPropertyType instanceof CXSIdentifierPropertyType) {
-                addIdentityFilters(cxsPropertyType.getName(), eventTypeFilterInput);
-            } else if (cxsPropertyType instanceof CXSStringPropertyType) {
-                addStringFilters(cxsPropertyType.getName(), eventTypeFilterInput);
-            } else if (cxsPropertyType instanceof CXSBooleanPropertyType) {
-                addBooleanFilters(cxsPropertyType.getName(), eventTypeFilterInput);
-            } else if (cxsPropertyType instanceof CXSIntPropertyType) {
-                addIntegerFilters(cxsPropertyType.getName(), eventTypeFilterInput);
-            } else if (cxsPropertyType instanceof CXSFloatPropertyType) {
-                addFloatFilters(cxsPropertyType.getName(), eventTypeFilterInput);
-            } else if (cxsPropertyType instanceof CXSGeoPointPropertyType) {
-                addDistanceFilters(cxsPropertyType.getName(), eventTypeFilterInput);
-            } else if (cxsPropertyType instanceof CXSDatePropertyType) {
-                addDateFilters(cxsPropertyType.getName(), eventTypeFilterInput);
-            } else if (cxsPropertyType instanceof CXSSetPropertyType) {
-                addSetFilters(cxsPropertyType.getName(), ((CXSSetPropertyType) cxsPropertyType).getProperties(), eventTypeFilterInput);
+        for (CDPPropertyType cdpPropertyType : properties) {
+            if (cdpPropertyType instanceof CDPIdentifierPropertyType) {
+                addIdentityFilters(cdpPropertyType.getName(), eventTypeFilterInput);
+            } else if (cdpPropertyType instanceof CDPStringPropertyType) {
+                addStringFilters(cdpPropertyType.getName(), eventTypeFilterInput);
+            } else if (cdpPropertyType instanceof CDPBooleanPropertyType) {
+                addBooleanFilters(cdpPropertyType.getName(), eventTypeFilterInput);
+            } else if (cdpPropertyType instanceof CDPIntPropertyType) {
+                addIntegerFilters(cdpPropertyType.getName(), eventTypeFilterInput);
+            } else if (cdpPropertyType instanceof CDPFloatPropertyType) {
+                addFloatFilters(cdpPropertyType.getName(), eventTypeFilterInput);
+            } else if (cdpPropertyType instanceof CDPGeoPointPropertyType) {
+                addDistanceFilters(cdpPropertyType.getName(), eventTypeFilterInput);
+            } else if (cdpPropertyType instanceof CDPDatePropertyType) {
+                addDateFilters(cdpPropertyType.getName(), eventTypeFilterInput);
+            } else if (cdpPropertyType instanceof CDPSetPropertyType) {
+                addSetFilters(cdpPropertyType.getName(), ((CDPSetPropertyType) cdpPropertyType).getProperties(), eventTypeFilterInput);
             }
         }
 
@@ -239,98 +239,98 @@ public class CXSEventBuilders implements CXSBuilder {
     private void addDistanceFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
         inputTypeBuilder.field(newInputObjectField()
                 .name(propertyName + "_distance")
-                .type((GraphQLInputType) typeRegistry.get("CXS_GeoDistanceInput"))
+                .type((GraphQLInputType) typeRegistry.get("CDP_GeoDistanceInput"))
         );
     }
 
     private void addDateFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
         inputTypeBuilder.field(newInputObjectField()
                 .name(propertyName + "_between")
-                .type((GraphQLInputType) typeRegistry.get("CXS_DateFilterInput"))
+                .type((GraphQLInputType) typeRegistry.get("CDP_DateFilterInput"))
         );
     }
 
-    private GraphQLInputType buildCXSEventFilterInputType() {
-        GraphQLInputObjectType.Builder cxsEventFilterInputType = newInputObject()
-                .name("CXS_EventFilterInput")
+    private GraphQLInputType buildCDPEventFilterInputType() {
+        GraphQLInputObjectType.Builder cdpEventFilterInputType = newInputObject()
+                .name("CDP_EventFilterInput")
                 .description("Filter conditions for each event types and built-in properties")
                 .field(newInputObjectField()
                         .name("and")
-                        .type(new GraphQLList(new GraphQLTypeReference("CXS_EventFilterInput")))
+                        .type(new GraphQLList(new GraphQLTypeReference("CDP_EventFilterInput")))
                 )
                 .field(newInputObjectField()
                         .name("or")
-                        .type(new GraphQLList(new GraphQLTypeReference("CXS_EventFilterInput")))
+                        .type(new GraphQLList(new GraphQLTypeReference("CDP_EventFilterInput")))
                 )
                 .field(newInputObjectField()
                         .name("properties")
-                        .type((GraphQLInputType) typeRegistry.get("CXS_EventPropertiesFilterInput"))
+                        .type((GraphQLInputType) typeRegistry.get("CDP_EventPropertiesFilterInput"))
                 )
                 .field(newInputObjectField()
                         .name("properties_or")
-                        .type((GraphQLInputType) typeRegistry.get("CXS_EventPropertiesFilterInput"))
+                        .type((GraphQLInputType) typeRegistry.get("CDP_EventPropertiesFilterInput"))
                 )
                 .field(newInputObjectField()
                         .name("eventOccurrence")
-                        .type((GraphQLInputType) typeRegistry.get("CXS_EventOccurrenceFilterInput"))
+                        .type((GraphQLInputType) typeRegistry.get("CDP_EventOccurrenceFilterInput"))
                 );
-        return cxsEventFilterInputType.build();
+        return cdpEventFilterInputType.build();
     }
 
-    private GraphQLInputType buildCXSEventInputType() {
-        GraphQLInputObjectType.Builder cxsEventInputType = CXSBuildersUtils.getInputBuilderFromAnnotatedClass(annotationsComponent, container, "CXS_EventInput", CXSEventInput.class)
+    private GraphQLInputType buildCDPEventInputType() {
+        GraphQLInputObjectType.Builder cdpEventInputType = CDPBuildersUtils.getInputBuilderFromAnnotatedClass(annotationsComponent, container, "CDP_EventInput", CDPEventInput.class)
                 .description("The event input object to send events to the Context Server");
 
-        for (Map.Entry<String,CXSEventType> cxsEventTypeEntry : eventTypes.entrySet()) {
-            CXSEventType cxsEventType = cxsEventTypeEntry.getValue();
-            cxsEventInputType.field(newInputObjectField()
-                    .name(cxsEventTypeEntry.getKey())
-                    .type(buildCXSEventTypeInputProperty(cxsEventType.getTypeName(), cxsEventType.getProperties()))
+        for (Map.Entry<String, CDPEventType> cdpEventTypeEntry : eventTypes.entrySet()) {
+            CDPEventType cdpEventType = cdpEventTypeEntry.getValue();
+            cdpEventInputType.field(newInputObjectField()
+                    .name(cdpEventTypeEntry.getKey())
+                    .type(buildCDPEventTypeInputProperty(cdpEventType.getTypeName(), cdpEventType.getProperties()))
             );
         }
 
-        return cxsEventInputType.build();
+        return cdpEventInputType.build();
 
     }
 
-    private GraphQLInputType buildCXSEventTypeInputProperty(String typeName, List<CXSPropertyType> propertyTypes) {
+    private GraphQLInputType buildCDPEventTypeInputProperty(String typeName, List<CDPPropertyType> propertyTypes) {
         String eventTypeName = typeName.substring(0, 1).toUpperCase() + typeName.substring(1) + "EventTypeInput";
         GraphQLInputObjectType.Builder eventInputType = newInputObject()
                 .name(eventTypeName)
                 .description("Event type object for event type " + typeName);
 
-        for (CXSPropertyType cxsEventPropertyType : propertyTypes) {
+        for (CDPPropertyType cdpEventPropertyType : propertyTypes) {
             GraphQLInputType eventPropertyInputType = null;
-            if (cxsEventPropertyType instanceof CXSIdentifierPropertyType) {
+            if (cdpEventPropertyType instanceof CDPIdentifierPropertyType) {
                 eventPropertyInputType = GraphQLID;
-            } else if (cxsEventPropertyType instanceof CXSStringPropertyType) {
+            } else if (cdpEventPropertyType instanceof CDPStringPropertyType) {
                 eventPropertyInputType = GraphQLString;
-            } else if (cxsEventPropertyType instanceof CXSIntPropertyType) {
+            } else if (cdpEventPropertyType instanceof CDPIntPropertyType) {
                 eventPropertyInputType = GraphQLInt;
-            } else if (cxsEventPropertyType instanceof CXSFloatPropertyType) {
+            } else if (cdpEventPropertyType instanceof CDPFloatPropertyType) {
                 eventPropertyInputType = GraphQLFloat;
-            } else if (cxsEventPropertyType instanceof CXSBooleanPropertyType) {
+            } else if (cdpEventPropertyType instanceof CDPBooleanPropertyType) {
                 eventPropertyInputType = GraphQLBoolean;
-            } else if (cxsEventPropertyType instanceof CXSDatePropertyType) {
+            } else if (cdpEventPropertyType instanceof CDPDatePropertyType) {
                 eventPropertyInputType = GraphQLString;
-            } else if (cxsEventPropertyType instanceof CXSGeoPointPropertyType) {
-                eventPropertyInputType = (GraphQLInputType) typeRegistry.get("CXS_GeoPoint");
-            } else if (cxsEventPropertyType instanceof CXSSetPropertyType) {
-                eventPropertyInputType = buildCXSEventTypeInputProperty(cxsEventPropertyType.getName(), ((CXSSetPropertyType)cxsEventPropertyType).getProperties());
+            } else if (cdpEventPropertyType instanceof CDPGeoPointPropertyType) {
+                eventPropertyInputType = (GraphQLInputType) typeRegistry.get("CDP_GeoPoint");
+            } else if (cdpEventPropertyType instanceof CDPSetPropertyType) {
+                eventPropertyInputType = buildCDPEventTypeInputProperty(cdpEventPropertyType.getName(), ((CDPSetPropertyType)cdpEventPropertyType).getProperties());
             }
             eventInputType
                     .field(newInputObjectField()
                             .type(eventPropertyInputType)
-                            .name(cxsEventPropertyType.getName())
+                            .name(cdpEventPropertyType.getName())
                     );
         }
 
         return eventInputType.build();
     }
 
-    private GraphQLOutputType buildCXSEventOutputType() {
+    private GraphQLOutputType buildCDPEventOutputType() {
         return newObject()
-                .name("CXS_Event")
+                .name("CDP_Event")
                 .description("An event is generated by user interacting with the Context Server")
                 .field(newFieldDefinition()
                         .type(GraphQLID)
@@ -338,8 +338,8 @@ public class CXSEventBuilders implements CXSBuilder {
                         .description("A unique identifier for the event")
                         .dataFetcher(new DataFetcher() {
                             public Object get(DataFetchingEnvironment environment) {
-                                CXSEvent CXSEvent = environment.getSource();
-                                return CXSEvent.getId();
+                                CDPEvent cdpEvent = environment.getSource();
+                                return cdpEvent.getId();
                             }
                         })
                 )
@@ -349,8 +349,8 @@ public class CXSEventBuilders implements CXSBuilder {
                         .description("An identifier for the event type")
                         .dataFetcher(new DataFetcher() {
                             public Object get(DataFetchingEnvironment environment) {
-                                CXSEvent CXSEvent = environment.getSource();
-                                return CXSEvent.getEventType();
+                                CDPEvent cdpEvent = environment.getSource();
+                                return cdpEvent.getEventType();
                             }
                         })
                 )
@@ -360,8 +360,8 @@ public class CXSEventBuilders implements CXSBuilder {
                         .description("The difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.")
                         .dataFetcher(new DataFetcher() {
                             public Object get(DataFetchingEnvironment environment) {
-                                CXSEvent CXSEvent = environment.getSource();
-                                return CXSEvent.getTimeStamp();
+                                CDPEvent cdpEvent = environment.getSource();
+                                return cdpEvent.getTimeStamp();
                             }
                         }))
                 .field(newFieldDefinition()
@@ -370,8 +370,8 @@ public class CXSEventBuilders implements CXSBuilder {
                         .description("The entity that has fired the event (using the profile)")
                         .dataFetcher(new DataFetcher() {
                             public Object get(DataFetchingEnvironment environment) {
-                                CXSEvent CXSEvent = environment.getSource();
-                                return CXSEvent.getSubject();
+                                CDPEvent cdpEvent = environment.getSource();
+                                return cdpEvent.getSubject();
                             }
                         }))
                 .field(newFieldDefinition()
@@ -380,81 +380,81 @@ public class CXSEventBuilders implements CXSBuilder {
                         .description("The object on which the event was fired.")
                         .dataFetcher(new DataFetcher() {
                             public Object get(DataFetchingEnvironment environment) {
-                                CXSEvent CXSEvent = environment.getSource();
-                                return CXSEvent.getObject();
+                                CDPEvent cdpEvent = environment.getSource();
+                                return cdpEvent.getObject();
                             }
                         })
                 )
                 .field(newFieldDefinition()
-                        .type((GraphQLOutputType) typeRegistry.get("CXS_GeoPoint"))
+                        .type((GraphQLOutputType) typeRegistry.get("CDP_GeoPoint"))
                         .name("location")
                         .description("The geo-point location where the event was fired.")
                         .dataFetcher(new DataFetcher() {
                             public Object get(DataFetchingEnvironment environment) {
-                                CXSEvent CXSEvent = environment.getSource();
-                                return CXSEvent.getLocation();
+                                CDPEvent cdpEvent = environment.getSource();
+                                return cdpEvent.getLocation();
                             }
                         })
                 )
                 .field(newFieldDefinition()
-                        .type(new GraphQLList(typeRegistry.get("CXS_EventProperties")))
+                        .type(new GraphQLList(typeRegistry.get("CDP_EventProperties")))
                         .name("properties")
                         .description("Generic properties for the event")
                         .dataFetcher(new DataFetcher() {
                             public Object get(DataFetchingEnvironment environment) {
-                                CXSEvent CXSEvent = environment.getSource();
-                                return new ArrayList<Map.Entry<Object,Object>>(CXSEvent.getProperties().getProperties().entrySet());
+                                CDPEvent cdpEvent = environment.getSource();
+                                return new ArrayList<Map.Entry<Object,Object>>(cdpEvent.getProperties().getProperties().entrySet());
                             }
                         })
                 )
                 .build();
     }
 
-    private GraphQLOutputType buildCXSEventPropertiesOutputType() {
-        GraphQLObjectType.Builder eventPropertiesOutputType = CXSBuildersUtils.getOutputBuilderFromAnnotatedClass(annotationsComponent, container, "CXS_EventProperties", CXSEventProperties.class)
+    private GraphQLOutputType buildCDPEventPropertiesOutputType() {
+        GraphQLObjectType.Builder eventPropertiesOutputType = CDPBuildersUtils.getOutputBuilderFromAnnotatedClass(annotationsComponent, container, "CDP_EventProperties", CDPEventProperties.class)
                 .description("All possible properties of an event");
 
-        for (Map.Entry<String,CXSEventType> cxsEventTypeEntry : eventTypes.entrySet()) {
-            CXSEventType cxsEventType = cxsEventTypeEntry.getValue();
+        for (Map.Entry<String, CDPEventType> cdpEventTypeEntry : eventTypes.entrySet()) {
+            CDPEventType cdpEventType = cdpEventTypeEntry.getValue();
             eventPropertiesOutputType
                     .field(newFieldDefinition()
-                            .type(buildEventOutputType(cxsEventType.getTypeName(), cxsEventType.getProperties()))
-                            .name(cxsEventTypeEntry.getKey())
+                            .type(buildEventOutputType(cdpEventType.getTypeName(), cdpEventType.getProperties()))
+                            .name(cdpEventTypeEntry.getKey())
                     );
         }
 
         return eventPropertiesOutputType.build();
     }
 
-    private GraphQLOutputType buildEventOutputType(String typeName, List<CXSPropertyType> propertyTypes) {
+    private GraphQLOutputType buildEventOutputType(String typeName, List<CDPPropertyType> propertyTypes) {
         String eventTypeName = typeName.substring(0, 1).toUpperCase() + typeName.substring(1) + "EventType";
         GraphQLObjectType.Builder eventOutputType = newObject()
                 .name(eventTypeName)
                 .description("Event type object for event type " + typeName);
 
-        for (CXSPropertyType cxsEventPropertyType : propertyTypes) {
+        for (CDPPropertyType cdpEventPropertyType : propertyTypes) {
             GraphQLOutputType eventPropertyOutputType = null;
-            if (cxsEventPropertyType instanceof CXSIdentifierPropertyType) {
+            if (cdpEventPropertyType instanceof CDPIdentifierPropertyType) {
                 eventPropertyOutputType = GraphQLID;
-            } else if (cxsEventPropertyType instanceof CXSStringPropertyType) {
+            } else if (cdpEventPropertyType instanceof CDPStringPropertyType) {
                 eventPropertyOutputType = GraphQLString;
-            } else if (cxsEventPropertyType instanceof CXSIntPropertyType) {
+            } else if (cdpEventPropertyType instanceof CDPIntPropertyType) {
                 eventPropertyOutputType = GraphQLInt;
-            } else if (cxsEventPropertyType instanceof CXSFloatPropertyType) {
+            } else if (cdpEventPropertyType instanceof CDPFloatPropertyType) {
                 eventPropertyOutputType = GraphQLFloat;
-            } else if (cxsEventPropertyType instanceof CXSBooleanPropertyType) {
+            } else if (cdpEventPropertyType instanceof CDPBooleanPropertyType) {
                 eventPropertyOutputType = GraphQLBoolean;
-            } else if (cxsEventPropertyType instanceof CXSDatePropertyType) {
+            } else if (cdpEventPropertyType instanceof CDPDatePropertyType) {
                 eventPropertyOutputType = GraphQLString;
-            } else if (cxsEventPropertyType instanceof CXSGeoPointPropertyType) {
-                eventPropertyOutputType = (GraphQLOutputType) typeRegistry.get("CXS_GeoPoint");
-            } else if (cxsEventPropertyType instanceof CXSSetPropertyType) {
-                eventPropertyOutputType = buildEventOutputType(cxsEventPropertyType.getName(), ((CXSSetPropertyType)cxsEventPropertyType).getProperties());
+            } else if (cdpEventPropertyType instanceof CDPGeoPointPropertyType) {
+                eventPropertyOutputType = (GraphQLOutputType) typeRegistry.get("CDP_GeoPoint");
+            } else if (cdpEventPropertyType instanceof CDPSetPropertyType) {
+                eventPropertyOutputType = buildEventOutputType(cdpEventPropertyType.getName(), ((CDPSetPropertyType)cdpEventPropertyType).getProperties());
             }
             eventOutputType
                     .field(newFieldDefinition()
                             .type(eventPropertyOutputType)
-                            .name(cxsEventPropertyType.getName())
+                            .name(cdpEventPropertyType.getName())
                     );
         }
 
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/CDPGraphQLProviderImpl.java
similarity index 68%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPGraphQLProviderImpl.java
index e5dc6ba..62adf7f 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/CDPGraphQLProviderImpl.java
@@ -22,18 +22,18 @@ import graphql.schema.*;
 import graphql.servlet.GraphQLMutationProvider;
 import graphql.servlet.GraphQLQueryProvider;
 import graphql.servlet.GraphQLTypesProvider;
-import org.apache.unomi.graphql.CXSGraphQLProvider;
-import org.apache.unomi.graphql.CXSMutation;
-import org.apache.unomi.graphql.CXSProviderManager;
-import org.apache.unomi.graphql.CXSQuery;
-import org.apache.unomi.graphql.builders.CXSEventBuilders;
-import org.apache.unomi.graphql.propertytypes.CXSSetPropertyType;
-import org.apache.unomi.graphql.types.input.CXSDateFilter;
-import org.apache.unomi.graphql.types.input.CXSEventTypeInput;
-import org.apache.unomi.graphql.types.input.CXSGeoDistanceInput;
-import org.apache.unomi.graphql.types.input.CXSOrderByInput;
-import org.apache.unomi.graphql.types.output.CXSEventType;
-import org.apache.unomi.graphql.types.output.CXSGeoPoint;
+import org.apache.unomi.graphql.CDPGraphQLProvider;
+import org.apache.unomi.graphql.CDPMutation;
+import org.apache.unomi.graphql.CDPProviderManager;
+import org.apache.unomi.graphql.CDPQuery;
+import org.apache.unomi.graphql.builders.CDPEventBuilders;
+import org.apache.unomi.graphql.propertytypes.CDPSetPropertyType;
+import org.apache.unomi.graphql.types.input.CDPDateFilter;
+import org.apache.unomi.graphql.types.input.CDPEventTypeInput;
+import org.apache.unomi.graphql.types.input.CDPGeoDistanceInput;
+import org.apache.unomi.graphql.types.input.CDPOrderByInput;
+import org.apache.unomi.graphql.types.output.CDPEventType;
+import org.apache.unomi.graphql.types.output.CDPGeoPoint;
 import org.apache.unomi.graphql.types.output.PageInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -46,54 +46,54 @@ import static graphql.schema.GraphQLArgument.newArgument;
 import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 import static graphql.schema.GraphQLObjectType.newObject;
 
-public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryProvider, GraphQLTypesProvider, GraphQLMutationProvider {
+public class CDPGraphQLProviderImpl implements CDPGraphQLProvider, GraphQLQueryProvider, GraphQLTypesProvider, GraphQLMutationProvider {
 
-    private static final Logger logger = LoggerFactory.getLogger(CXSGraphQLProviderImpl.class.getName());
+    private static final Logger logger = LoggerFactory.getLogger(CDPGraphQLProviderImpl.class.getName());
 
-    private CXSProviderManager cxsProviderManager;
+    private CDPProviderManager cdpProviderManager;
     private GraphQLAnnotationsComponent annotationsComponent;
     private ProcessingElementsContainer container;
-    private CXSEventBuilders cxsEventBuilders;
+    private CDPEventBuilders cdpEventBuilders;
     private Map<String,GraphQLType> typeRegistry;
 
-    private Map<String, CXSEventType> eventTypes = new TreeMap<>();
+    private Map<String, CDPEventType> eventTypes = new TreeMap<>();
 
-    public CXSGraphQLProviderImpl(GraphQLAnnotationsComponent annotationsComponent) {
+    public CDPGraphQLProviderImpl(GraphQLAnnotationsComponent annotationsComponent) {
         this.annotationsComponent = annotationsComponent;
         container = annotationsComponent.createContainer();
         container.setInputPrefix("");
         container.setInputSuffix("Input");
         typeRegistry = container.getTypeRegistry();
-        cxsEventBuilders = new CXSEventBuilders(annotationsComponent, container, eventTypes);
+        cdpEventBuilders = new CDPEventBuilders(annotationsComponent, container, eventTypes);
         updateGraphQLTypes();
     }
 
     @Override
-    public Map<String, CXSEventType> getEventTypes() {
+    public Map<String, CDPEventType> getEventTypes() {
         return eventTypes;
     }
 
-    public CXSProviderManager getCxsProviderManager() {
-        return cxsProviderManager;
+    public CDPProviderManager getCdpProviderManager() {
+        return cdpProviderManager;
     }
 
     public void updateGraphQLTypes() {
         typeRegistry.clear();
         typeRegistry.put(PageInfo.class.getName(), annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(PageInfo.class, container));
 
-        typeRegistry.put("CXS_GeoPoint", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSGeoPoint.class, container));
-        typeRegistry.put("CXS_SetPropertyType",annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSSetPropertyType.class, container));
-        typeRegistry.put("CXS_EventType", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSEventType.class, container));
+        typeRegistry.put("CDP_GeoPoint", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CDPGeoPoint.class, container));
+        typeRegistry.put("CDP_SetPropertyType",annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CDPSetPropertyType.class, container));
+        typeRegistry.put("CDP_EventType", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CDPEventType.class, container));
 
-        typeRegistry.put("CXS_GeoDistanceInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSGeoDistanceInput.class, container));
-        typeRegistry.put("CXS_DateFilterInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSDateFilter.class, container));
-        typeRegistry.put("CXS_EventTypeInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSEventTypeInput.class, container));
-        typeRegistry.put("CXS_OrderByInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSOrderByInput.class, container));
+        typeRegistry.put("CDP_GeoDistanceInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CDPGeoDistanceInput.class, container));
+        typeRegistry.put("CDP_DateFilterInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CDPDateFilter.class, container));
+        typeRegistry.put("CDP_EventTypeInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CDPEventTypeInput.class, container));
+        typeRegistry.put("CDP_OrderByInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CDPOrderByInput.class, container));
 
-        cxsEventBuilders.updateTypes();
+        cdpEventBuilders.updateTypes();
 
-        typeRegistry.put("CXS_Query", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSQuery.class, container));
-        typeRegistry.put("CXS_Mutation", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSMutation.class, container));
+        typeRegistry.put("CDP_Query", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CDPQuery.class, container));
+        typeRegistry.put("CDP_Mutation", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CDPMutation.class, container));
 
     }
 
@@ -106,21 +106,21 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
         return (GraphQLInputObjectType) typeRegistry.get(typeName);
     }
 
-    public void setCxsProviderManager(CXSProviderManager cxsProviderManager) {
-        this.cxsProviderManager = cxsProviderManager;
+    public void setCdpProviderManager(CDPProviderManager cdpProviderManager) {
+        this.cdpProviderManager = cdpProviderManager;
     }
 
     @Override
     public Collection<GraphQLFieldDefinition> getQueries() {
         List<GraphQLFieldDefinition> fieldDefinitions = new ArrayList<GraphQLFieldDefinition>();
-        final CXSGraphQLProvider cxsGraphQLProvider = this;
+        final CDPGraphQLProvider cdpGraphQLProvider = this;
         fieldDefinitions.add(newFieldDefinition()
-                .type(getOutputTypeFromRegistry("CXS_Query"))
-                .name("cxs")
-                .description("Root field for all CXS queries")
-                .dataFetcher(new DataFetcher<CXSGraphQLProvider>() {
-                    public CXSGraphQLProvider get(DataFetchingEnvironment environment) {
-                        return cxsGraphQLProvider;
+                .type(getOutputTypeFromRegistry("CDP_Query"))
+                .name("cdp")
+                .description("Root field for all CDP queries")
+                .dataFetcher(new DataFetcher<CDPGraphQLProvider>() {
+                    public CDPGraphQLProvider get(DataFetchingEnvironment environment) {
+                        return cdpGraphQLProvider;
                     }
                 }).build());
         return fieldDefinitions;
@@ -134,44 +134,44 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
     @Override
     public Collection<GraphQLFieldDefinition> getMutations() {
         List<GraphQLFieldDefinition> fieldDefinitions = new ArrayList<GraphQLFieldDefinition>();
-        final CXSGraphQLProvider cxsGraphQLProvider = this;
+        final CDPGraphQLProvider cdpGraphQLProvider = this;
         fieldDefinitions.add(newFieldDefinition()
-                .type(getOutputTypeFromRegistry("CXS_Mutation"))
-                .name("cxs")
-                .description("Root field for all CXS mutations")
-                .dataFetcher(new DataFetcher<CXSGraphQLProvider>() {
+                .type(getOutputTypeFromRegistry("CDP_Mutation"))
+                .name("cdp")
+                .description("Root field for all CDP mutations")
+                .dataFetcher(new DataFetcher<CDPGraphQLProvider>() {
                     @Override
-                    public CXSGraphQLProvider get(DataFetchingEnvironment environment) {
-                        return cxsGraphQLProvider;
+                    public CDPGraphQLProvider get(DataFetchingEnvironment environment) {
+                        return cdpGraphQLProvider;
                     }
                 }).build());
         return fieldDefinitions;
     }
 
-    private GraphQLOutputType buildCXSQueryOutputType() {
+    private GraphQLOutputType buildCDPQueryOutputType() {
         return newObject()
-                .name("CXS_Query")
-                .description("Root CXS query type")
+                .name("CDP_Query")
+                .description("Root CDP query type")
                 .field(newFieldDefinition()
-                        .type(new GraphQLList(getOutputTypeFromRegistry("CXS_EventType")))
+                        .type(new GraphQLList(getOutputTypeFromRegistry("CDP_EventType")))
                         .name("getEventTypes")
-                        .description("Retrieves the list of all the declared CXS event types in the Apache Unomi server")
+                        .description("Retrieves the list of all the declared CDP event types in the Apache Unomi server")
                 )
                 .field(newFieldDefinition()
-                        .type(new GraphQLList(getOutputTypeFromRegistry("CXS_Event")))
+                        .type(new GraphQLList(getOutputTypeFromRegistry("CDP_Event")))
                         .name("getEvent")
                         .description("Retrieves a specific event")
                 )
                 .field(newFieldDefinition()
-                        .type(new GraphQLList(getOutputTypeFromRegistry("CXS_EventConnection")))
+                        .type(new GraphQLList(getOutputTypeFromRegistry("CDP_EventConnection")))
                         .name("findEvents")
                         .argument(newArgument()
                                 .name("filter")
-                                .type(getInputTypeFromRegistry("CXS_EventFilterInput"))
+                                .type(getInputTypeFromRegistry("CDP_EventFilterInput"))
                         )
                         .argument(newArgument()
                                 .name("orderBy")
-                                .type(getInputTypeFromRegistry("CXS_OrderByInput"))
+                                .type(getInputTypeFromRegistry("CDP_OrderByInput"))
                         )
                         .argument(newArgument()
                                 .name("first")
@@ -196,7 +196,7 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                         .description("Retrieves the events that match the specified filters")
                 )
                 .field(newFieldDefinition()
-                        .type(getOutputTypeFromRegistry("CXS_Segment"))
+                        .type(getOutputTypeFromRegistry("CDP_Segment"))
                         .name("getSegment")
                         .argument(newArgument()
                                 .name("segmentId")
@@ -206,15 +206,15 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                 )
                 /*
                 .field(newFieldDefinition()
-                        .type(new GraphQLList(registeredOutputTypes.get("CXS_ProfileConnection")))
+                        .type(new GraphQLList(registeredOutputTypes.get("CDP_ProfileConnection")))
                         .name("findProfiles")
                         .argument(newArgument()
                                 .name("filter")
-                                .type(registeredInputTypes.get("CXS_ProfileFilterInput"))
+                                .type(registeredInputTypes.get("CDP_ProfileFilterInput"))
                         )
                         .argument(newArgument()
                                 .name("orderBy")
-                                .type(registeredInputTypes.get(CXSOrderByInput.class.getName()))
+                                .type(registeredInputTypes.get(CDPOrderByInput.class.getName()))
                         )
                         .argument(newArgument()
                                 .name("first")
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPProviderManagerImpl.java
similarity index 86%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPProviderManagerImpl.java
index cd7c56f..e8b75f8 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPProviderManagerImpl.java
@@ -22,8 +22,8 @@ import graphql.servlet.GraphQLMutationProvider;
 import graphql.servlet.GraphQLQueryProvider;
 import graphql.servlet.GraphQLTypesProvider;
 import org.apache.unomi.api.services.SegmentService;
-import org.apache.unomi.graphql.CXSGraphQLProvider;
-import org.apache.unomi.graphql.CXSProviderManager;
+import org.apache.unomi.graphql.CDPGraphQLProvider;
+import org.apache.unomi.graphql.CDPProviderManager;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.component.ComponentContext;
@@ -35,12 +35,12 @@ import org.osgi.service.component.annotations.Reference;
 import java.util.Map;
 
 @Component(
-        name="CXSProviderManager",
+        name="CDPProviderManager",
         immediate = true
 )
-public class CXSProviderManagerImpl implements CXSProviderManager {
+public class CDPProviderManagerImpl implements CDPProviderManager {
 
-    private CXSGraphQLProvider cxsGraphQLProvider;
+    private CDPGraphQLProvider cdpGraphQLProvider;
     private GraphQLAnnotationsComponent annotationsComponent;
     private GraphQLFieldRetriever graphQLFieldRetriever;
     private SegmentService segmentService;
@@ -77,13 +77,13 @@ public class CXSProviderManagerImpl implements CXSProviderManager {
             BundleContext bundleContext,
             Map<String,Object> config) {
         this.bundleContext = bundleContext;
-        this.cxsGraphQLProvider = new CXSGraphQLProviderImpl(annotationsComponent);
-        this.cxsGraphQLProvider.setCxsProviderManager(this);
+        this.cdpGraphQLProvider = new CDPGraphQLProviderImpl(annotationsComponent);
+        this.cdpGraphQLProvider.setCdpProviderManager(this);
         providerSR = bundleContext.registerService(new String[] {
                 GraphQLQueryProvider.class.getName(),
                 GraphQLTypesProvider.class.getName(),
                 GraphQLMutationProvider.class.getName()
-        }, cxsGraphQLProvider, null);
+        }, cdpGraphQLProvider, null);
     }
 
     @Deactivate
@@ -92,8 +92,8 @@ public class CXSProviderManagerImpl implements CXSProviderManager {
             BundleContext bundleContext,
             Map<String,Object> config) {
         providerSR.unregister();
-        cxsGraphQLProvider.setCxsProviderManager(null);
-        cxsGraphQLProvider = null;
+        cdpGraphQLProvider.setCdpProviderManager(null);
+        cdpGraphQLProvider = null;
     }
 
     public void refreshProviders() {
@@ -104,7 +104,7 @@ public class CXSProviderManagerImpl implements CXSProviderManager {
                     GraphQLQueryProvider.class.getName(),
                     GraphQLTypesProvider.class.getName(),
                     GraphQLMutationProvider.class.getName()
-            }, cxsGraphQLProvider, null);
+            }, cdpGraphQLProvider, null);
         }
     }
 
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSBooleanPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPBooleanPropertyType.java
similarity index 89%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSBooleanPropertyType.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPBooleanPropertyType.java
index c50dd3b..f066102 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSBooleanPropertyType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPBooleanPropertyType.java
@@ -21,12 +21,12 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_BooleanPropertyType")
-public class CXSBooleanPropertyType extends CXSPropertyType {
+@GraphQLName("CDP_BooleanPropertyType")
+public class CDPBooleanPropertyType extends CDPPropertyType {
 
     private Boolean defaultValue;
 
-    public CXSBooleanPropertyType(@GraphQLName("id") String id,
+    public CDPBooleanPropertyType(@GraphQLName("id") String id,
                                   @GraphQLName("name") String name,
                                   @GraphQLName("minOccurrences") Integer minOccurrences,
                                   @GraphQLName("maxOccurrences") Integer maxOccurrences,
@@ -38,7 +38,7 @@ public class CXSBooleanPropertyType extends CXSPropertyType {
         this.defaultValue = defaultValue;
     }
 
-    public CXSBooleanPropertyType(CXSPropertyType input, Boolean defaultValue) {
+    public CDPBooleanPropertyType(CDPPropertyType input, Boolean defaultValue) {
         super(input);
         this.defaultValue = defaultValue;
     }
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/CDPDatePropertyType.java
similarity index 92%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSDatePropertyType.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPDatePropertyType.java
index bd5d0a1..cdac2c2 100644
--- 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/CDPDatePropertyType.java
@@ -21,12 +21,12 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_DatePropertyType")
-public class CXSDatePropertyType extends CXSPropertyType {
+@GraphQLName("CDP_DatePropertyType")
+public class CDPDatePropertyType extends CDPPropertyType {
 
     private String defaultValue;
 
-    public CXSDatePropertyType(@GraphQLName("id") String id,
+    public CDPDatePropertyType(@GraphQLName("id") String id,
                                @GraphQLName("name") String name,
                                @GraphQLName("minOccurrences") Integer minOccurrences,
                                @GraphQLName("maxOccurrences") Integer maxOccurrences,
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/CDPFloatPropertyType.java
similarity index 93%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSFloatPropertyType.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPFloatPropertyType.java
index e53b28b..35f3b7d 100644
--- 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/CDPFloatPropertyType.java
@@ -21,14 +21,14 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_FloatPropertyType")
-public class CXSFloatPropertyType extends CXSPropertyType {
+@GraphQLName("CDP_FloatPropertyType")
+public class CDPFloatPropertyType extends CDPPropertyType {
 
     private Double minValue;
     private Double maxValue;
     private Double defaultValue;
 
-    public CXSFloatPropertyType(@GraphQLName("id") String id,
+    public CDPFloatPropertyType(@GraphQLName("id") String id,
                                 @GraphQLName("name") String name,
                                 @GraphQLName("minOccurrences") Integer minOccurrences,
                                 @GraphQLName("maxOccurrences") Integer maxOccurrences,
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSGeoPointPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPGeoPointPropertyType.java
similarity index 91%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSGeoPointPropertyType.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPGeoPointPropertyType.java
index a3935b4..734bfd6 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSGeoPointPropertyType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPGeoPointPropertyType.java
@@ -21,12 +21,12 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_GeoPointPropertyType")
-public class CXSGeoPointPropertyType extends CXSPropertyType {
+@GraphQLName("CDP_GeoPointPropertyType")
+public class CDPGeoPointPropertyType extends CDPPropertyType {
 
     private String defaultValue;
 
-    public CXSGeoPointPropertyType(@GraphQLName("id") String id,
+    public CDPGeoPointPropertyType(@GraphQLName("id") String id,
                                    @GraphQLName("name") String name,
                                    @GraphQLName("minOccurrences") Integer minOccurrences,
                                    @GraphQLName("maxOccurrences") Integer maxOccurrences,
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIdentifierPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPIdentifierPropertyType.java
similarity index 92%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIdentifierPropertyType.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPIdentifierPropertyType.java
index 01435cb..ab09a6b 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIdentifierPropertyType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPIdentifierPropertyType.java
@@ -21,13 +21,13 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_IdentifierPropertyType")
-public class CXSIdentifierPropertyType extends CXSPropertyType {
+@GraphQLName("CDP_IdentifierPropertyType")
+public class CDPIdentifierPropertyType extends CDPPropertyType {
 
     private String regexp;
     private String defaultValue;
 
-    public CXSIdentifierPropertyType(@GraphQLName("id") String id,
+    public CDPIdentifierPropertyType(@GraphQLName("id") String id,
                                      @GraphQLName("name") String name,
                                      @GraphQLName("minOccurrences") Integer minOccurrences,
                                      @GraphQLName("maxOccurrences") Integer maxOccurrences,
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIntPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPIntPropertyType.java
similarity index 93%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIntPropertyType.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPIntPropertyType.java
index 99239ee..100dd9a 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIntPropertyType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPIntPropertyType.java
@@ -21,14 +21,14 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_IntPropertyType")
-public class CXSIntPropertyType extends CXSPropertyType {
+@GraphQLName("CDP_IntPropertyType")
+public class CDPIntPropertyType extends CDPPropertyType {
 
     private Integer minValue;
     private Integer maxValue;
     private Integer defaultValue;
 
-    public CXSIntPropertyType(@GraphQLName("id") String id,
+    public CDPIntPropertyType(@GraphQLName("id") String id,
                               @GraphQLName("name") String name,
                               @GraphQLName("minOccurrences") Integer minOccurrences,
                               @GraphQLName("maxOccurrences") Integer maxOccurrences,
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPPropertyType.java
similarity index 94%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSPropertyType.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPPropertyType.java
index ab2f9e4..2851f08 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSPropertyType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPPropertyType.java
@@ -21,8 +21,8 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_PropertyType")
-public class CXSPropertyType {
+@GraphQLName("CDP_PropertyType")
+public class CDPPropertyType {
 
     private String id;
     private String name;
@@ -32,7 +32,7 @@ public class CXSPropertyType {
     private List<String> systemTags;
     private Boolean personalData;
 
-    public CXSPropertyType(@GraphQLName("id") String id,
+    public CDPPropertyType(@GraphQLName("id") String id,
                            @GraphQLName("name") String name,
                            @GraphQLName("minOccurrences") Integer minOccurrences,
                            @GraphQLName("maxOccurrences") Integer maxOccurrences,
@@ -48,7 +48,7 @@ public class CXSPropertyType {
         this.personalData = personalData;
     }
 
-    public CXSPropertyType(CXSPropertyType input) {
+    public CDPPropertyType(CDPPropertyType input) {
         this.id = input.id;
         this.name = input.name;
         this.minOccurrences = input.minOccurrences;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSSetPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPSetPropertyType.java
similarity index 82%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSSetPropertyType.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPSetPropertyType.java
index befb5bd..bf1c52c 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSSetPropertyType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPSetPropertyType.java
@@ -21,25 +21,25 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_SetPropertyType")
-public class CXSSetPropertyType extends CXSPropertyType {
+@GraphQLName("CDP_SetPropertyType")
+public class CDPSetPropertyType extends CDPPropertyType {
 
-    private List<CXSPropertyType> properties;
+    private List<CDPPropertyType> properties;
 
-    public CXSSetPropertyType(@GraphQLName("id") String id,
+    public CDPSetPropertyType(@GraphQLName("id") String id,
                               @GraphQLName("name") String name,
                               @GraphQLName("minOccurrences") Integer minOccurrences,
                               @GraphQLName("maxOccurrences") Integer maxOccurrences,
                               @GraphQLName("tags") List<String> tags,
                               @GraphQLName("systemTags") List<String> systemTags,
                               @GraphQLName("personalData") Boolean personalData,
-                              @GraphQLName("properties") List<CXSPropertyType> properties) {
+                              @GraphQLName("properties") List<CDPPropertyType> properties) {
         super(id, name, minOccurrences, maxOccurrences, tags, systemTags, personalData);
         this.properties = properties;
     }
 
     @GraphQLField
-    public List<CXSPropertyType> getProperties() {
+    public List<CDPPropertyType> getProperties() {
         return properties;
     }
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSStringPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPStringPropertyType.java
similarity index 92%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSStringPropertyType.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPStringPropertyType.java
index 8604436..7982c80 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSStringPropertyType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CDPStringPropertyType.java
@@ -21,13 +21,13 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_StringPropertyType")
-public class CXSStringPropertyType extends CXSPropertyType {
+@GraphQLName("CDP_StringPropertyType")
+public class CDPStringPropertyType extends CDPPropertyType {
 
     private String regexp;
     private String defaultValue;
 
-    public CXSStringPropertyType(@GraphQLName("id") String id,
+    public CDPStringPropertyType(@GraphQLName("id") String id,
                                  @GraphQLName("name") String name,
                                  @GraphQLName("minOccurrences") Integer minOccurrences,
                                  @GraphQLName("maxOccurrences") Integer maxOccurrences,
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSDateFilter.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPDateFilter.java
similarity index 95%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSDateFilter.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPDateFilter.java
index 0a48393..9058fc1 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSDateFilter.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPDateFilter.java
@@ -19,8 +19,8 @@ package org.apache.unomi.graphql.types.input;
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXS_DateFilter")
-public class CXSDateFilter {
+@GraphQLName("CDP_DateFilter")
+public class CDPDateFilter {
     @GraphQLField
     public long after;
     @GraphQLField
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventFilter.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPEventFilter.java
similarity index 87%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventFilter.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPEventFilter.java
index b699672..c058b71 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventFilter.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPEventFilter.java
@@ -21,15 +21,15 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_EventFilter")
-public class CXSEventFilter {
+@GraphQLName("CDP_EventFilter")
+public class CDPEventFilter {
 
     @GraphQLField
     @GraphQLName("and")
-    public List<CXSEventFilter> andFilters;
+    public List<CDPEventFilter> andFilters;
 
     @GraphQLField
     @GraphQLName("or")
-    public List<CXSEventFilter> orFilters;
+    public List<CDPEventFilter> orFilters;
 
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPEventInput.java
similarity index 92%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPEventInput.java
index 2a076cd..9d1d6f2 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPEventInput.java
@@ -22,15 +22,15 @@ import graphql.annotations.annotationTypes.GraphQLName;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-@GraphQLName("CXS_Event")
-public class CXSEventInput {
+@GraphQLName("CDP_Event")
+public class CDPEventInput {
     private String id;
     private String eventType;
     private long timeStamp;
     private String subject;
     private String object;
     private Map<Object,Object> properties = new LinkedHashMap<>();
-    private CXSGeoPointInput location;
+    private CDPGeoPointInput location;
 
     @GraphQLField
     public String getId() {
@@ -62,7 +62,7 @@ public class CXSEventInput {
     }
 
     @GraphQLField
-    public CXSGeoPointInput getLocation() {
+    public CDPGeoPointInput getLocation() {
         return location;
     }
 
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventOccurrenceFilterInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPEventOccurrenceFilterInput.java
similarity index 93%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventOccurrenceFilterInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPEventOccurrenceFilterInput.java
index ee74489..2934464 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventOccurrenceFilterInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPEventOccurrenceFilterInput.java
@@ -19,8 +19,8 @@ package org.apache.unomi.graphql.types.input;
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXS_EventOccurrenceFilter")
-public class CXSEventOccurrenceFilterInput {
+@GraphQLName("CDP_EventOccurrenceFilter")
+public class CDPEventOccurrenceFilterInput {
 
     @GraphQLField
     public String eventId;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPEventTypeInput.java
similarity index 84%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventTypeInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPEventTypeInput.java
index 5f94aff..42dfe9f 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPEventTypeInput.java
@@ -22,18 +22,18 @@ import graphql.annotations.annotationTypes.GraphQLName;
 import java.util.ArrayList;
 import java.util.List;
 
-@GraphQLName("CXS_EventType")
-public class CXSEventTypeInput {
+@GraphQLName("CDP_EventType")
+public class CDPEventTypeInput {
 
     private String id;
     private String scope;
     private String typeName;
-    private List<CXSPropertyTypeInput> properties = new ArrayList<>();
+    private List<CDPPropertyTypeInput> properties = new ArrayList<>();
 
-    public CXSEventTypeInput(@GraphQLName("id") String id,
+    public CDPEventTypeInput(@GraphQLName("id") String id,
                              @GraphQLName("scope") String scope,
                              @GraphQLName("typeName") String typeName,
-                             @GraphQLName("properties") List<CXSPropertyTypeInput> properties) {
+                             @GraphQLName("properties") List<CDPPropertyTypeInput> properties) {
         this.id = id;
         this.scope = scope;
         this.typeName = typeName;
@@ -56,7 +56,7 @@ public class CXSEventTypeInput {
     }
 
     @GraphQLField
-    public List<CXSPropertyTypeInput> getProperties() {
+    public List<CDPPropertyTypeInput> getProperties() {
         return properties;
     }
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoDistanceInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPGeoDistanceInput.java
similarity index 80%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoDistanceInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPGeoDistanceInput.java
index 7b8352a..3dd45a2 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoDistanceInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPGeoDistanceInput.java
@@ -18,15 +18,15 @@ package org.apache.unomi.graphql.types.input;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
-import org.apache.unomi.graphql.types.output.CXSGeoDistanceUnit;
-import org.apache.unomi.graphql.types.output.CXSGeoPoint;
+import org.apache.unomi.graphql.types.output.CDPGeoDistanceUnit;
+import org.apache.unomi.graphql.types.output.CDPGeoPoint;
 
-@GraphQLName("CXS_GeoDistance")
-public class CXSGeoDistanceInput {
+@GraphQLName("CDP_GeoDistance")
+public class CDPGeoDistanceInput {
     @GraphQLField
-    public CXSGeoPoint center;
+    public CDPGeoPoint center;
     @GraphQLField
-    public CXSGeoDistanceUnit unit;
+    public CDPGeoDistanceUnit unit;
     @GraphQLField
     public Double distance;
 }
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/CDPGeoPointInput.java
similarity index 94%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoPointInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPGeoPointInput.java
index 772abb8..8359d46 100644
--- 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/CDPGeoPointInput.java
@@ -19,8 +19,8 @@ package org.apache.unomi.graphql.types.input;
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXS_GeoPoint")
-public class CXSGeoPointInput {
+@GraphQLName("CDP_GeoPoint")
+public class CDPGeoPointInput {
     @GraphQLField
     public Double longitude;
     @GraphQLField
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/CDPOrderByInput.java
similarity index 87%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSOrderByInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPOrderByInput.java
index 3ee5e1c..6ba329d 100644
--- 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/CDPOrderByInput.java
@@ -18,14 +18,14 @@ 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;
+import org.apache.unomi.graphql.types.output.CDPSortOrder;
 
-@GraphQLName("CXS_OrderBy")
-public class CXSOrderByInput {
+@GraphQLName("CDP_OrderBy")
+public class CDPOrderByInput {
 
     @GraphQLField
     public String fieldName;
 
     @GraphQLField
-    public CXSSortOrder sortOrder;
+    public CDPSortOrder sortOrder;
 }
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/CDPPropertyTypeInput.java
similarity index 65%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSPropertyTypeInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPPropertyTypeInput.java
index 9917ca3..c9cb037 100644
--- 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/CDPPropertyTypeInput.java
@@ -20,18 +20,18 @@ import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 import org.apache.unomi.graphql.propertytypes.*;
 
-@GraphQLName("CXS_PropertyType")
-public class CXSPropertyTypeInput {
+@GraphQLName("CDP_PropertyType")
+public class CDPPropertyTypeInput {
 
-    public CXSPropertyTypeInput(
-            @GraphQLName("identifier") CXSIdentifierPropertyType identifierPropertyTypeInput,
-            @GraphQLName("string") CXSStringPropertyType stringPropertyTypeInput,
-            @GraphQLName("int") CXSIntPropertyType integerPropertyTypeInput,
-            @GraphQLName("float") CXSFloatPropertyType floatPropertyTypeInput,
-            @GraphQLName("date") CXSDatePropertyType datePropertyTypeInput,
-            @GraphQLName("boolean") CXSBooleanPropertyType booleanPropertyTypeInput,
-            @GraphQLName("geopoint") CXSGeoPointPropertyType geoPointPropertyTypeInput,
-            @GraphQLName("set") CXSSetPropertyTypeInput setPropertyTypeInput) {
+    public CDPPropertyTypeInput(
+            @GraphQLName("identifier") CDPIdentifierPropertyType identifierPropertyTypeInput,
+            @GraphQLName("string") CDPStringPropertyType stringPropertyTypeInput,
+            @GraphQLName("int") CDPIntPropertyType integerPropertyTypeInput,
+            @GraphQLName("float") CDPFloatPropertyType floatPropertyTypeInput,
+            @GraphQLName("date") CDPDatePropertyType datePropertyTypeInput,
+            @GraphQLName("boolean") CDPBooleanPropertyType booleanPropertyTypeInput,
+            @GraphQLName("geopoint") CDPGeoPointPropertyType geoPointPropertyTypeInput,
+            @GraphQLName("set") CDPSetPropertyTypeInput setPropertyTypeInput) {
         this.identifierPropertyTypeInput = identifierPropertyTypeInput;
         this.stringPropertyTypeInput = stringPropertyTypeInput;
         this.integerPropertyTypeInput = integerPropertyTypeInput;
@@ -44,33 +44,33 @@ public class CXSPropertyTypeInput {
 
     @GraphQLField
     @GraphQLName("identifier")
-    public CXSIdentifierPropertyType identifierPropertyTypeInput;
+    public CDPIdentifierPropertyType identifierPropertyTypeInput;
 
     @GraphQLField
     @GraphQLName("string")
-    public CXSStringPropertyType stringPropertyTypeInput;
+    public CDPStringPropertyType stringPropertyTypeInput;
 
     @GraphQLField
     @GraphQLName("int")
-    public CXSIntPropertyType integerPropertyTypeInput;
+    public CDPIntPropertyType integerPropertyTypeInput;
 
     @GraphQLField
     @GraphQLName("float")
-    public CXSFloatPropertyType floatPropertyTypeInput;
+    public CDPFloatPropertyType floatPropertyTypeInput;
 
     @GraphQLField
     @GraphQLName("date")
-    public CXSDatePropertyType datePropertyTypeInput;
+    public CDPDatePropertyType datePropertyTypeInput;
 
     @GraphQLField
     @GraphQLName("boolean")
-    public CXSBooleanPropertyType booleanPropertyTypeInput;
+    public CDPBooleanPropertyType booleanPropertyTypeInput;
 
     @GraphQLField
     @GraphQLName("geopoint")
-    public CXSGeoPointPropertyType geoPointPropertyTypeInput;
+    public CDPGeoPointPropertyType geoPointPropertyTypeInput;
 
     @GraphQLField
     @GraphQLName("set")
-    public CXSSetPropertyTypeInput setPropertyTypeInput;
+    public CDPSetPropertyTypeInput setPropertyTypeInput;
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSegmentFilterInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPSegmentFilterInput.java
similarity index 89%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSegmentFilterInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPSegmentFilterInput.java
index 95bbc9d..0f8193b 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSegmentFilterInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPSegmentFilterInput.java
@@ -21,16 +21,16 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_SegmentFilter")
-public class CXSSegmentFilterInput {
+@GraphQLName("CDP_SegmentFilter")
+public class CDPSegmentFilterInput {
 
     @GraphQLField
     @GraphQLName("and")
-    public List<CXSSegmentFilterInput> andFilters;
+    public List<CDPSegmentFilterInput> andFilters;
 
     @GraphQLField
     @GraphQLName("or")
-    public List<CXSSegmentFilterInput> orFilters;
+    public List<CDPSegmentFilterInput> orFilters;
 
     @GraphQLField
     @GraphQLName("view_equals")
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSetPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPSetPropertyTypeInput.java
similarity index 82%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSetPropertyTypeInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPSetPropertyTypeInput.java
index ba762f9..120e8f6 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSetPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CDPSetPropertyTypeInput.java
@@ -18,28 +18,29 @@ package org.apache.unomi.graphql.types.input;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
+import org.apache.unomi.graphql.propertytypes.CDPPropertyType;
 
 import java.util.List;
 
-@GraphQLName("CXS_SetPropertyType")
-public class CXSSetPropertyTypeInput extends org.apache.unomi.graphql.propertytypes.CXSPropertyType {
+@GraphQLName("CDP_SetPropertyType")
+public class CDPSetPropertyTypeInput extends CDPPropertyType {
 
-    private List<CXSPropertyTypeInput> properties;
+    private List<CDPPropertyTypeInput> properties;
 
-    public CXSSetPropertyTypeInput(@GraphQLName("id") String id,
+    public CDPSetPropertyTypeInput(@GraphQLName("id") String id,
                                    @GraphQLName("name") String name,
                                    @GraphQLName("minOccurrences") Integer minOccurrences,
                                    @GraphQLName("maxOccurrences") Integer maxOccurrences,
                                    @GraphQLName("tags") List<String> tags,
                                    @GraphQLName("systemTags") List<String> systemTags,
                                    @GraphQLName("personalData") Boolean personalData,
-                                   @GraphQLName("properties") List<CXSPropertyTypeInput> properties) {
+                                   @GraphQLName("properties") List<CDPPropertyTypeInput> properties) {
         super(id, name, minOccurrences, maxOccurrences, tags, systemTags, personalData);
         this.properties = properties;
     }
 
     @GraphQLField
-    public List<CXSPropertyTypeInput> getProperties() {
+    public List<CDPPropertyTypeInput> getProperties() {
         return properties;
     }
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEvent.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEvent.java
similarity index 87%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEvent.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEvent.java
index 738ef7e..cf973a5 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEvent.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEvent.java
@@ -19,16 +19,16 @@ package org.apache.unomi.graphql.types.output;
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXS_Event")
-public class CXSEvent {
+@GraphQLName("CDP_Event")
+public class CDPEvent {
 
     private String id;
     private String eventType;
     private long timeStamp;
     private String subject;
     private String object;
-    private CXSEventProperties properties = new CXSEventProperties();
-    private CXSGeoPoint location;
+    private CDPEventProperties properties = new CDPEventProperties();
+    private CDPGeoPoint location;
 
     @GraphQLField
     public String getId() {
@@ -56,12 +56,12 @@ public class CXSEvent {
     }
 
     @GraphQLField
-    public CXSEventProperties getProperties() {
+    public CDPEventProperties getProperties() {
         return properties;
     }
 
     @GraphQLField
-    public CXSGeoPoint getLocation() {
+    public CDPGeoPoint getLocation() {
         return location;
     }
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventConnection.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventConnection.java
similarity index 90%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventConnection.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventConnection.java
index 5852b8d..cd26ab9 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventConnection.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventConnection.java
@@ -21,11 +21,11 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_EventConnection")
-public class CXSEventConnection {
+@GraphQLName("CDP_EventConnection")
+public class CDPEventConnection {
 
     @GraphQLField
-    public List<CXSEventEdge> edges;
+    public List<CDPEventEdge> edges;
     @GraphQLField
     public PageInfo pageInfo;
 
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventEdge.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventEdge.java
similarity index 92%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventEdge.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventEdge.java
index 1be39a6..a42bb50 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventEdge.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventEdge.java
@@ -19,11 +19,11 @@ package org.apache.unomi.graphql.types.output;
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXS_EventEdge")
-public class CXSEventEdge {
+@GraphQLName("CDP_EventEdge")
+public class CDPEventEdge {
 
     @GraphQLField
-    public CXSEvent node;
+    public CDPEvent node;
     @GraphQLField
     public String cursor;
 
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventFilter.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventFilter.java
similarity index 87%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventFilter.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventFilter.java
index 9d26663..9a168a5 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventFilter.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventFilter.java
@@ -21,12 +21,12 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_EventFilter")
-public class CXSEventFilter {
+@GraphQLName("CDP_EventFilter")
+public class CDPEventFilter {
 
     @GraphQLField
-    public List<CXSEventFilter> andFilters;
+    public List<CDPEventFilter> andFilters;
     @GraphQLField
-    public List<CXSEventFilter> orFilters;
+    public List<CDPEventFilter> orFilters;
 
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventOccurrenceFilter.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventOccurrenceFilter.java
similarity index 90%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventOccurrenceFilter.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventOccurrenceFilter.java
index 7fac676..2fb2272 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventOccurrenceFilter.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventOccurrenceFilter.java
@@ -19,8 +19,8 @@ package org.apache.unomi.graphql.types.output;
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXS_EventOccurrenceFilter")
-public class CXSEventOccurrenceFilter {
+@GraphQLName("CDP_EventOccurrenceFilter")
+public class CDPEventOccurrenceFilter {
     @GraphQLField
     public String eventType;
     @GraphQLField
@@ -32,5 +32,5 @@ public class CXSEventOccurrenceFilter {
     @GraphQLField
     public int count;
 
-    public CXSEventFilter eventFilter;
+    public CDPEventFilter eventFilter;
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventProperties.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventProperties.java
similarity index 94%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventProperties.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventProperties.java
index 7431cf9..1fe0739 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventProperties.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventProperties.java
@@ -22,8 +22,8 @@ import graphql.annotations.annotationTypes.GraphQLName;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-@GraphQLName("CXS_EventProperties")
-public class CXSEventProperties {
+@GraphQLName("CDP_EventProperties")
+public class CDPEventProperties {
     @GraphQLField
     public int nbProperties;
 
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventPropertiesFilter.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventPropertiesFilter.java
similarity index 91%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventPropertiesFilter.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventPropertiesFilter.java
index 9580a51..1340387 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventPropertiesFilter.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventPropertiesFilter.java
@@ -18,6 +18,6 @@ package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXS_EventPropertiesFilter")
-public class CXSEventPropertiesFilter {
+@GraphQLName("CDP_EventPropertiesFilter")
+public class CDPEventPropertiesFilter {
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventType.java
similarity index 82%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventType.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventType.java
index 38a7d4e..e59895b 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPEventType.java
@@ -18,23 +18,23 @@ package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
-import org.apache.unomi.graphql.propertytypes.CXSPropertyType;
+import org.apache.unomi.graphql.propertytypes.CDPPropertyType;
 
 import java.util.ArrayList;
 import java.util.List;
 
-@GraphQLName("CXS_EventType")
-public class CXSEventType {
+@GraphQLName("CDP_EventType")
+public class CDPEventType {
 
     private String id;
     private String scope;
     private String typeName;
-    private List<CXSPropertyType> properties = new ArrayList<>();
+    private List<CDPPropertyType> properties = new ArrayList<>();
 
-    public CXSEventType(@GraphQLName("id") String id,
+    public CDPEventType(@GraphQLName("id") String id,
                         @GraphQLName("scope") String scope,
                         @GraphQLName("typeName") String typeName,
-                        @GraphQLName("properties") List<CXSPropertyType> properties) {
+                        @GraphQLName("properties") List<CDPPropertyType> properties) {
         this.id = id;
         this.scope = scope;
         this.typeName = typeName;
@@ -57,7 +57,7 @@ public class CXSEventType {
     }
 
     @GraphQLField
-    public List<CXSPropertyType> getProperties() {
+    public List<CDPPropertyType> getProperties() {
         return properties;
     }
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoDistanceUnit.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoDistanceUnit.java
similarity index 93%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoDistanceUnit.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoDistanceUnit.java
index 8be9aee..f046e62 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoDistanceUnit.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoDistanceUnit.java
@@ -18,8 +18,8 @@ package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXS_GeoDistanceUnit")
-public enum CXSGeoDistanceUnit {
+@GraphQLName("CDP_GeoDistanceUnit")
+public enum CDPGeoDistanceUnit {
     METERS,
     KILOMETERS,
     MILES
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoPoint.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoPoint.java
similarity index 94%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoPoint.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoPoint.java
index 12e3e0a..58cc2b8 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoPoint.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPGeoPoint.java
@@ -19,8 +19,8 @@ package org.apache.unomi.graphql.types.output;
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXS_GeoPoint")
-public class CXSGeoPoint {
+@GraphQLName("CDP_GeoPoint")
+public class CDPGeoPoint {
 
     @GraphQLField
     public Double latitude;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegment.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPSegment.java
similarity index 89%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegment.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPSegment.java
index 5f64798..abf8e53 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegment.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPSegment.java
@@ -19,14 +19,14 @@ package org.apache.unomi.graphql.types.output;
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXS_Segment")
-public class CXSSegment {
+@GraphQLName("CDP_Segment")
+public class CDPSegment {
     @GraphQLField
     public String id;
     @GraphQLField
-    public CXSView view;
+    public CDPView view;
     @GraphQLField
     public String name;
     @GraphQLField
-    public CXSSegmentCondition condition;
+    public CDPSegmentCondition condition;
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentCondition.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPSegmentCondition.java
similarity index 81%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentCondition.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPSegmentCondition.java
index eca9f90..2f42b68 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentCondition.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPSegmentCondition.java
@@ -18,16 +18,16 @@ package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
-import org.apache.unomi.graphql.CXSProfilePropertiesFilter;
+import org.apache.unomi.graphql.CDPProfilePropertiesFilter;
 
 import java.util.List;
 
-@GraphQLName("CXS_SegmentCondition")
-public class CXSSegmentCondition {
+@GraphQLName("CDP_SegmentCondition")
+public class CDPSegmentCondition {
     @GraphQLField
-    public CXSProfilePropertiesFilter profilePropertiesFilter;
+    public CDPProfilePropertiesFilter profilePropertiesFilter;
     @GraphQLField
     public List<String> grantedConsents;
     @GraphQLField
-    public CXSEventOccurrenceFilter eventOccurrenceFilter;
+    public CDPEventOccurrenceFilter eventOccurrenceFilter;
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentConnection.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPSegmentConnection.java
similarity index 90%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentConnection.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPSegmentConnection.java
index 09fe699..92def0f 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentConnection.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPSegmentConnection.java
@@ -21,10 +21,10 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_SegmentConnection")
-public class CXSSegmentConnection {
+@GraphQLName("CDP_SegmentConnection")
+public class CDPSegmentConnection {
     @GraphQLField
-    public List<CXSSegmentEdge> edges;
+    public List<CDPSegmentEdge> edges;
     @GraphQLField
     public PageInfo pageInfo;
 
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentEdge.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPSegmentEdge.java
similarity index 91%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentEdge.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPSegmentEdge.java
index f45b872..d0dd7eb 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentEdge.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPSegmentEdge.java
@@ -19,11 +19,11 @@ package org.apache.unomi.graphql.types.output;
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXS_SegmentEdge")
-public class CXSSegmentEdge {
+@GraphQLName("CDP_SegmentEdge")
+public class CDPSegmentEdge {
 
     @GraphQLField
-    public CXSSegment edge;
+    public CDPSegment edge;
 
     @GraphQLField
     public String cursor;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSortOrder.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPSortOrder.java
similarity index 94%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSortOrder.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPSortOrder.java
index 34d8c11..20cc1da 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSortOrder.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPSortOrder.java
@@ -18,8 +18,8 @@ package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXS_SortOrder")
-public enum CXSSortOrder {
+@GraphQLName("CDP_SortOrder")
+public enum CDPSortOrder {
     ASC,
     DESC,
     UNSPECIFIED
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSView.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPView.java
similarity index 95%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSView.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPView.java
index a8e3616..c053755 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSView.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CDPView.java
@@ -19,8 +19,8 @@ package org.apache.unomi.graphql.types.output;
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXS_view")
-public class CXSView {
+@GraphQLName("CDP_View")
+public class CDPView {
     @GraphQLField
     public String name;
 }


[unomi] 02/15: 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.

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit d5d67258acf4922b78ef2ea0f0193d3e9f2ac404
Author: Serge Huber <sh...@apache.org>
AuthorDate: Fri May 11 14:52:56 2018 +0200

    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 <sh...@apache.org>
---
 .../unomi/graphql/AbstractPropertyTypeInput.java   | 40 ++++++++++++++++
 .../unomi/graphql/CXSBooleanPropertyTypeInput.java | 28 +++++++++++
 .../unomi/graphql/CXSDatePropertyTypeInput.java    | 26 ++++++++++
 .../apache/unomi/graphql/CXSEventTypeInput.java    | 36 ++++++++++++++
 .../unomi/graphql/CXSFloatPropertyTypeInput.java   | 30 ++++++++++++
 .../graphql/CXSGeoPointPropertyTypeInput.java      | 25 ++++++++++
 .../graphql/CXSIdentifierPropertyTypeInput.java    | 28 +++++++++++
 .../unomi/graphql/CXSIntPropertyTypeInput.java     | 30 ++++++++++++
 .../apache/unomi/graphql/CXSPropertyTypeInput.java | 56 ++++++++++++++++++++++
 .../unomi/graphql/CXSSetPropertyTypeInput.java     | 27 +++++++++++
 .../unomi/graphql/CXSStringPropertyTypeInput.java  | 28 +++++++++++
 .../graphql/internal/CXSGraphQLProviderImpl.java   | 43 ++++++++++++++++-
 12 files changed, 396 insertions(+), 1 deletion(-)

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 0000000..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<String> tags;
+    @GraphQLField
+    public List<String> systemTags;
+    @GraphQLField
+    public boolean personalData;
+
+}
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 0000000..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
+ *
+ *      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("CXSBooleanPropertyTypeInput")
+public class CXSBooleanPropertyTypeInput extends AbstractPropertyTypeInput {
+
+    @GraphQLField
+    public boolean defaultValue;
+
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDatePropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDatePropertyTypeInput.java
new file mode 100644
index 0000000..e8036aa
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDatePropertyTypeInput.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;
+
+import graphql.annotations.annotationTypes.GraphQLField;
+
+public class CXSDatePropertyTypeInput extends AbstractPropertyTypeInput {
+
+    @GraphQLField
+    public String defaultValue;
+
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java
new file mode 100644
index 0000000..b84175f
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java
@@ -0,0 +1,36 @@
+/*
+ * 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 CXSEventTypeInput {
+
+    @GraphQLField
+    public String id;
+
+    @GraphQLField
+    public String scope;
+
+    @GraphQLField
+    public String typeName;
+
+    @GraphQLField
+    public List<CXSPropertyTypeInput> properties;
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSFloatPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSFloatPropertyTypeInput.java
new file mode 100644
index 0000000..038f4a5
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSFloatPropertyTypeInput.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 CXSFloatPropertyTypeInput extends AbstractPropertyTypeInput{
+
+    @GraphQLField
+    public float minValue;
+    @GraphQLField
+    public float maxValue;
+    @GraphQLField
+    public float defaultValue;
+
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointPropertyTypeInput.java
new file mode 100644
index 0000000..c32def1
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointPropertyTypeInput.java
@@ -0,0 +1,25 @@
+/*
+ * 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 CXSGeoPointPropertyTypeInput extends AbstractPropertyTypeInput {
+
+    @GraphQLField
+    public String defaultValue;
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIdentifierPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIdentifierPropertyTypeInput.java
new file mode 100644
index 0000000..49869bc
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIdentifierPropertyTypeInput.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;
+
+import graphql.annotations.annotationTypes.GraphQLField;
+
+public class CXSIdentifierPropertyTypeInput extends AbstractPropertyTypeInput {
+
+    @GraphQLField
+    public String regexp;
+    @GraphQLField
+    public String defaultValue;
+
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIntPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIntPropertyTypeInput.java
new file mode 100644
index 0000000..f2dac72
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIntPropertyTypeInput.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 CXSIntPropertyTypeInput extends AbstractPropertyTypeInput {
+
+    @GraphQLField
+    public int minValue;
+    @GraphQLField
+    public int maxValue;
+    @GraphQLField
+    public int defaultValue;
+
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
new file mode 100644
index 0000000..60a1aa4
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
@@ -0,0 +1,56 @@
+/*
+ * 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("CXSPropertyTypeInput")
+public class CXSPropertyTypeInput {
+
+    @GraphQLField
+    @GraphQLName("identifier")
+    public CXSIdentifierPropertyTypeInput identifierPropertyTypeInput;
+
+    @GraphQLField
+    @GraphQLName("string")
+    public CXSStringPropertyTypeInput stringPropertyTypeInput;
+
+    @GraphQLField
+    @GraphQLName("int")
+    public CXSIntPropertyTypeInput integer;
+
+    @GraphQLField
+    @GraphQLName("float")
+    public CXSFloatPropertyTypeInput floatPropertyTypeInput;
+
+    @GraphQLField
+    @GraphQLName("date")
+    public CXSDatePropertyTypeInput datePropertyTypeInput;
+
+    @GraphQLField
+    @GraphQLName("boolean")
+    public CXSBooleanPropertyTypeInput booleanPropertyTypeInput;
+
+    @GraphQLField
+    @GraphQLName("geopoint")
+    public CXSGeoPointPropertyTypeInput geoPointPropertyTypeInput;
+
+    @GraphQLField
+    @GraphQLName("set")
+    public CXSSetPropertyTypeInput setPropertyTypeInput;
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
new file mode 100644
index 0000000..5db69dd
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.unomi.graphql;
+
+import graphql.annotations.annotationTypes.GraphQLField;
+
+import java.util.List;
+
+public class CXSSetPropertyTypeInput extends AbstractPropertyTypeInput {
+
+    @GraphQLField
+    public List<CXSPropertyTypeInput> properties;
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSStringPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSStringPropertyTypeInput.java
new file mode 100644
index 0000000..c44496f
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSStringPropertyTypeInput.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;
+
+import graphql.annotations.annotationTypes.GraphQLField;
+
+public class CXSStringPropertyTypeInput extends AbstractPropertyTypeInput {
+
+    @GraphQLField
+    public String regexp;
+    @GraphQLField
+    public String defaultValue;
+
+}
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 e451dde..b9e876a 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
@@ -17,6 +17,11 @@
 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.schema.*;
 import graphql.servlet.GraphQLMutationProvider;
 import graphql.servlet.GraphQLQueryProvider;
@@ -31,6 +36,7 @@ import org.osgi.service.component.annotations.Deactivate;
 import java.util.*;
 
 import static graphql.Scalars.*;
+import static graphql.schema.GraphQLArgument.newArgument;
 import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 import static graphql.schema.GraphQLObjectType.newObject;
 
@@ -41,6 +47,7 @@ import static graphql.schema.GraphQLObjectType.newObject;
 public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryProvider, GraphQLTypesProvider, GraphQLMutationProvider {
 
     private Map<String,GraphQLOutputType> registeredOutputTypes = new TreeMap<>();
+    private Map<String,GraphQLInputType> registeredInputTypes = new TreeMap<>();
 
     @Activate
     void activate(
@@ -52,8 +59,15 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
         registeredOutputTypes.put(CXSProperties.class.getName(), GraphQLAnnotations.object(CXSProperties.class));
         registeredOutputTypes.put(CXSEventType.class.getName(), GraphQLAnnotations.object(CXSEventType.class));
 
+        GraphQLObjectInfoRetriever graphQLObjectInfoRetriever = new GraphQLObjectInfoRetriever();
+        GraphQLInputObjectType cxsEventTypeInput = new InputObjectBuilder(graphQLObjectInfoRetriever, new ParentalSearch(graphQLObjectInfoRetriever),
+                new BreadthFirstSearch(graphQLObjectInfoRetriever), new GraphQLFieldRetriever()).
+                getInputObjectBuilder(CXSEventTypeInput.class, GraphQLAnnotations.getInstance().getContainer()).build();
+        registeredInputTypes.put(CXSEventTypeInput.class.getName(), cxsEventTypeInput);
+
         registeredOutputTypes.put("CXS_Event", buildCXSEventOutputType());
         registeredOutputTypes.put("CXS_Query", buildCXSQueryOutputType());
+        registeredOutputTypes.put("CXS_Mutation", buildCXSMutationOutputType());
     }
 
     @Deactivate
@@ -88,7 +102,18 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
 
     @Override
     public Collection<GraphQLFieldDefinition> getMutations() {
-        return new ArrayList<>();
+        List<GraphQLFieldDefinition> fieldDefinitions = new ArrayList<GraphQLFieldDefinition>();
+        fieldDefinitions.add(newFieldDefinition()
+                .type(registeredOutputTypes.get("CXS_Mutation"))
+                .name("cxs")
+                .description("Root field for all CXS mutation")
+                .dataFetcher(new DataFetcher() {
+                    public Object get(DataFetchingEnvironment environment) {
+                        Map<String,Object> map = environment.getContext();
+                        return map.keySet();
+                    }
+                }).build());
+        return fieldDefinitions;
     }
 
     private GraphQLOutputType buildCXSQueryOutputType() {
@@ -103,6 +128,22 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                 .build();
     }
 
+    private GraphQLOutputType buildCXSMutationOutputType() {
+        return newObject()
+                .name("CXS_Mutation")
+                .description("Root CXS mutation type")
+                .field(newFieldDefinition()
+                        .type(registeredOutputTypes.get(CXSEventType.class.getName()))
+                        .name("createOrUpdateEventType")
+                        .argument(newArgument()
+                                .name("eventType")
+                                .type(registeredInputTypes.get(CXSEventTypeInput.class.getName()))
+                        )
+                        .description("Create or updates a CXS event type in the Apache Unomi server")
+                )
+                .build();
+    }
+
 
     private GraphQLOutputType buildCXSEventOutputType() {
         return newObject()


[unomi] 04/15: UNOMI-180 Implement CXS GraphQL API - Event type registration and dynamic schema generation is now mostly working !

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit 2b2f88333c0cde328752d3453df361139b0a1e9f
Author: Serge Huber <sh...@apache.org>
AuthorDate: Wed May 23 20:56:03 2018 +0200

    UNOMI-180 Implement CXS GraphQL API
    - Event type registration and dynamic schema generation is now mostly working !
    
    Signed-off-by: Serge Huber <sh...@apache.org>
---
 .../graphql/internal/CXSGraphQLProviderImpl.java   | 133 +++++++++++++++++++--
 .../graphql/internal/CXSProviderManagerImpl.java   |  12 +-
 2 files changed, 132 insertions(+), 13 deletions(-)

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<String,GraphQLOutputType> registeredOutputTypes = new TreeMap<>();
     private Map<String,GraphQLInputType> registeredInputTypes = new TreeMap<>();
     private CXSProviderManager cxsProviderManager;
+    private GraphQLAnnotationsComponent annotationsComponent;
+    private ProcessingElementsContainer container;
 
     private Map<String,CXSEventType> 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));
 
+        /*
         GraphQLObjectInfoRetriever graphQLObjectInfoRetriever = new GraphQLObjectInfoRetriever();
         GraphQLInputObjectType cxsEventTypeInput = new InputObjectBuilder(graphQLObjectInfoRetriever, new ParentalSearch(graphQLObjectInfoRetriever),
                 new BreadthFirstSearch(graphQLObjectInfoRetriever), new GraphQLFieldRetriever()).
                 getInputObjectBuilder(CXSEventTypeInput.class, GraphQLAnnotations.getInstance().getContainer()).build();
         registeredInputTypes.put(CXSEventTypeInput.class.getName(), cxsEventTypeInput);
+        */
 
         registeredOutputTypes.put("CXS_Event", buildCXSEventOutputType());
         registeredOutputTypes.put("CXS_Query", buildCXSQueryOutputType());
         registeredOutputTypes.put("CXS_Mutation", buildCXSMutationOutputType());
     }
 
+    private GraphQLInputType buildCXSEventInputType() {
+        GraphQLInputObjectType.Builder cxsEventInputType = newInputObject()
+                .name("CXS_EventInput")
+                .description("The event input object to send events to the Context Server")
+                .field(newInputObjectField()
+                        .name("id")
+                        .type(GraphQLID)
+                );
+
+        for (Map.Entry<String,CXSEventType> cxsEventTypeEntry : eventTypes.entrySet()) {
+            CXSEventType cxsEventType = cxsEventTypeEntry.getValue();
+            cxsEventInputType.field(newInputObjectField()
+                    .name(cxsEventTypeEntry.getKey())
+                    .type(buildCXSEventTypeInputProperty(cxsEventType.typeName, cxsEventType.properties))
+            );
+        }
+
+        return cxsEventInputType.build();
+
+    }
+
+    private GraphQLInputType buildCXSEventTypeInputProperty(String typeName, List<CXSPropertyType> propertyTypes) {
+        String eventTypeName = typeName.substring(0, 1).toUpperCase() + typeName.substring(1) + "EventTypeInput";
+        GraphQLInputObjectType.Builder eventInputType = newInputObject()
+                .name(eventTypeName)
+                .description("Event type object for event type " + typeName);
+
+        for (CXSPropertyType cxsEventPropertyType : propertyTypes) {
+            GraphQLInputType eventPropertyInputType = null;
+            if (cxsEventPropertyType instanceof CXSIdentifierPropertyType) {
+                eventPropertyInputType = GraphQLID;
+            } else if (cxsEventPropertyType instanceof CXSStringPropertyType) {
+                eventPropertyInputType = GraphQLString;
+            } else if (cxsEventPropertyType instanceof CXSIntPropertyType) {
+                eventPropertyInputType = GraphQLInt;
+            } else if (cxsEventPropertyType instanceof CXSFloatPropertyType) {
+                eventPropertyInputType = GraphQLFloat;
+            } else if (cxsEventPropertyType instanceof CXSBooleanPropertyType) {
+                eventPropertyInputType = GraphQLBoolean;
+            } else if (cxsEventPropertyType instanceof CXSDatePropertyType) {
+                eventPropertyInputType = GraphQLString;
+            } else if (cxsEventPropertyType instanceof CXSGeoPointPropertyType) {
+                eventPropertyInputType = registeredInputTypes.get(CXSGeoPoint.class.getName());
+            } else if (cxsEventPropertyType instanceof CXSSetPropertyType) {
+                eventPropertyInputType = buildCXSEventTypeInputProperty(cxsEventPropertyType.name, ((CXSSetPropertyType)cxsEventPropertyType).properties);
+            }
+            eventInputType
+                    .field(newInputObjectField()
+                            .type(eventPropertyInputType)
+                            .name(cxsEventPropertyType.name)
+                    );
+        }
+
+        return eventInputType.build();
+    }
+
     @Deactivate
     void deactivate(
             ComponentContext cc,
@@ -182,6 +247,14 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                             }
                         })
                 )
+                .field(newFieldDefinition()
+                        .name("processEvents")
+                        .description("Processes events sent to the Context Server")
+                        .argument(newArgument()
+                                .name("events")
+                                .type(new GraphQLList(registeredInputTypes.get("CXS_EventInput"))))
+                        .type(GraphQLInt)
+                )
                 .build();
     }
 
@@ -205,7 +278,7 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
         CXSSetPropertyType cxsSetPropertyType = new CXSSetPropertyType();
         Map<String,Object> setPropertyTypeMap = (Map<String,Object>) propertyTypeMap.get("set");
         populateCommonProperties(setPropertyTypeMap, cxsSetPropertyType);
-        if (propertyTypeMap.containsKey("properties")) {
+        if (setPropertyTypeMap.containsKey("properties")) {
             List<Map<String,Object>> propertyList = (List<Map<String,Object>>) setPropertyTypeMap.get("properties");
             List<CXSPropertyType> setProperties = new ArrayList<>();
             for (Map<String,Object> setProperty : propertyList) {
@@ -343,7 +416,7 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
             CXSEventType cxsEventType = cxsEventTypeEntry.getValue();
             eventPropertiesOutputType
                     .field(newFieldDefinition()
-                            .type(registeredOutputTypes.get(CXSSetPropertyType.class.getName()))
+                            .type(buildEventOutputType(cxsEventType.typeName, cxsEventType.properties))
                             .name(cxsEventTypeEntry.getKey())
                     );
         }
@@ -351,4 +424,40 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
         return eventPropertiesOutputType.build();
     }
 
+    private GraphQLOutputType buildEventOutputType(String typeName, List<CXSPropertyType> propertyTypes) {
+        String eventTypeName = typeName.substring(0, 1).toUpperCase() + typeName.substring(1) + "EventType";
+        GraphQLObjectType.Builder eventOutputType = newObject()
+                .name(eventTypeName)
+                .description("Event type object for event type " + typeName);
+
+        for (CXSPropertyType cxsEventPropertyType : propertyTypes) {
+            GraphQLOutputType eventPropertyOutputType = null;
+            if (cxsEventPropertyType instanceof CXSIdentifierPropertyType) {
+                eventPropertyOutputType = GraphQLID;
+            } else if (cxsEventPropertyType instanceof CXSStringPropertyType) {
+                eventPropertyOutputType = GraphQLString;
+            } else if (cxsEventPropertyType instanceof CXSIntPropertyType) {
+                eventPropertyOutputType = GraphQLInt;
+            } else if (cxsEventPropertyType instanceof CXSFloatPropertyType) {
+                eventPropertyOutputType = GraphQLFloat;
+            } else if (cxsEventPropertyType instanceof CXSBooleanPropertyType) {
+                eventPropertyOutputType = GraphQLBoolean;
+            } else if (cxsEventPropertyType instanceof CXSDatePropertyType) {
+                eventPropertyOutputType = GraphQLString;
+            } else if (cxsEventPropertyType instanceof CXSGeoPointPropertyType) {
+                eventPropertyOutputType = registeredOutputTypes.get(CXSGeoPoint.class.getName());
+            } else if (cxsEventPropertyType instanceof CXSSetPropertyType) {
+                eventPropertyOutputType = buildEventOutputType(cxsEventPropertyType.name, ((CXSSetPropertyType)cxsEventPropertyType).properties);
+            }
+            eventOutputType
+                    .field(newFieldDefinition()
+                            .type(eventPropertyOutputType)
+                            .name(cxsEventPropertyType.name)
+                    );
+        }
+
+
+        return eventOutputType.build();
+    }
+
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
index 8b7b80a..bb00d54 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
@@ -16,6 +16,8 @@
  */
 package org.apache.unomi.graphql.internal;
 
+import graphql.annotations.processor.GraphQLAnnotationsComponent;
+import graphql.annotations.processor.ProcessingElementsContainer;
 import graphql.servlet.GraphQLMutationProvider;
 import graphql.servlet.GraphQLQueryProvider;
 import graphql.servlet.GraphQLTypesProvider;
@@ -27,6 +29,7 @@ import org.osgi.service.component.ComponentContext;
 import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
 import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Reference;
 
 import java.util.Map;
 
@@ -37,16 +40,23 @@ import java.util.Map;
 public class CXSProviderManagerImpl implements CXSProviderManager {
 
     private CXSGraphQLProvider cxsGraphQLProvider;
+    private GraphQLAnnotationsComponent annotationsComponent;
+    private ProcessingElementsContainer container;
     private ServiceRegistration<?> providerSR;
     private BundleContext bundleContext;
 
+    @Reference
+    public void setAnnotationsComponent(GraphQLAnnotationsComponent annotationsComponent) {
+        this.annotationsComponent = annotationsComponent;
+    }
+
     @Activate
     void activate(
             ComponentContext componentContext,
             BundleContext bundleContext,
             Map<String,Object> config) {
         this.bundleContext = bundleContext;
-        this.cxsGraphQLProvider = new CXSGraphQLProviderImpl();
+        this.cxsGraphQLProvider = new CXSGraphQLProviderImpl(annotationsComponent);
         this.cxsGraphQLProvider.setCxsProviderManager(this);
         providerSR = bundleContext.registerService(new String[] {
                 GraphQLQueryProvider.class.getName(),


[unomi] 09/15: UNOMI-180 Implement CXS GraphQL API Make sure we use CXS_ prefix everywhere.

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit 1443ccb1156f0d7b624247edaadd852827351961
Author: Serge Huber <sh...@apache.org>
AuthorDate: Fri Jul 27 18:08:27 2018 +0200

    UNOMI-180 Implement CXS GraphQL API
    Make sure we use CXS_ prefix everywhere.
    
    Signed-off-by: Serge Huber <sh...@apache.org>
---
 .../apache/unomi/graphql/CXSDateFilterInput.java   |  2 ++
 .../java/org/apache/unomi/graphql/CXSEvent.java    |  2 ++
 .../apache/unomi/graphql/CXSEventConnection.java   |  2 ++
 .../org/apache/unomi/graphql/CXSEventEdge.java     |  2 ++
 .../org/apache/unomi/graphql/CXSEventFilter.java   |  2 ++
 .../apache/unomi/graphql/CXSEventFilterInput.java  |  1 +
 .../org/apache/unomi/graphql/CXSEventInput.java    |  2 ++
 .../unomi/graphql/CXSEventOccurrenceFilter.java    |  2 ++
 .../graphql/CXSEventOccurrenceFilterInput.java     |  2 ++
 .../apache/unomi/graphql/CXSEventProperties.java   |  2 ++
 .../unomi/graphql/CXSEventPropertiesFilter.java    |  3 +++
 .../apache/unomi/graphql/CXSEventTypeInput.java    |  1 +
 .../apache/unomi/graphql/CXSGeoDistanceInput.java  |  2 ++
 .../apache/unomi/graphql/CXSGeoDistanceUnit.java   |  3 +++
 .../java/org/apache/unomi/graphql/CXSGeoPoint.java |  2 ++
 .../org/apache/unomi/graphql/CXSGeoPointInput.java |  2 ++
 .../org/apache/unomi/graphql/CXSOrderByInput.java  |  2 ++
 .../unomi/graphql/CXSProfilePropertiesFilter.java  |  1 +
 .../org/apache/unomi/graphql/CXSProperties.java    | 28 ----------------------
 .../apache/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 ++
 .../unomi/graphql/builders/CXSEventBuilders.java   | 22 ++++++++---------
 .../graphql/internal/CXSGraphQLProviderImpl.java   | 20 +++++++---------
 .../propertytypes/CXSBooleanPropertyType.java      |  2 +-
 .../graphql/propertytypes/CXSDatePropertyType.java |  1 +
 .../propertytypes/CXSFloatPropertyType.java        |  1 +
 .../propertytypes/CXSGeoPointPropertyType.java     |  1 +
 .../propertytypes/CXSIdentifierPropertyType.java   |  1 +
 .../graphql/propertytypes/CXSIntPropertyType.java  |  1 +
 .../graphql/propertytypes/CXSPropertyType.java     |  1 +
 .../graphql/propertytypes/CXSSetPropertyType.java  |  1 +
 .../propertytypes/CXSStringPropertyType.java       |  1 +
 34 files changed, 71 insertions(+), 52 deletions(-)

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;
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;
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
--- 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
@@ -17,9 +17,11 @@
 package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
+@GraphQLName("CXS_EventConnection")
 public class CXSEventConnection {
 
     @GraphQLField
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventEdge.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventEdge.java
index e58d422..3b81f0a 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventEdge.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventEdge.java
@@ -17,7 +17,9 @@
 package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
+@GraphQLName("CXS_EventEdge")
 public class CXSEventEdge {
 
     @GraphQLField
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilter.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilter.java
index 9e4ebe8..82a3ebd 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilter.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilter.java
@@ -17,9 +17,11 @@
 package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
+@GraphQLName("CXS_EventFilter")
 public class CXSEventFilter {
 
     @GraphQLField
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilterInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilterInput.java
index 1e46e60..855a6ab 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilterInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilterInput.java
@@ -21,6 +21,7 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
+@GraphQLName("CXS_EventFilterInput")
 public class CXSEventFilterInput {
 
     @GraphQLField
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventInput.java
index 9b7b752..473953b 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventInput.java
@@ -17,10 +17,12 @@
 package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.LinkedHashMap;
 import java.util.Map;
 
+@GraphQLName("CXS_EventInput")
 public class CXSEventInput {
     private String id;
     private String eventType;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilter.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilter.java
index a80fb0f..7abd342 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilter.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilter.java
@@ -17,7 +17,9 @@
 package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
+@GraphQLName("CXS_EventOccurrenceFilter")
 public class CXSEventOccurrenceFilter {
     @GraphQLField
     public String eventType;
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
index 83d23da..1ffaa19 100644
--- 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
@@ -17,7 +17,9 @@
 package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
+@GraphQLName("CXS_EventOccurrenceFilterInput")
 public class CXSEventOccurrenceFilterInput {
 
     @GraphQLField
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventProperties.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventProperties.java
index 7b072b9..95c0b1b 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventProperties.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventProperties.java
@@ -17,10 +17,12 @@
 package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.LinkedHashMap;
 import java.util.Map;
 
+@GraphQLName("CXS_EventProperties")
 public class CXSEventProperties {
     @GraphQLField
     public int nbProperties;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventPropertiesFilter.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventPropertiesFilter.java
index c24664f..45f9101 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventPropertiesFilter.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventPropertiesFilter.java
@@ -16,5 +16,8 @@
  */
 package org.apache.unomi.graphql;
 
+import graphql.annotations.annotationTypes.GraphQLName;
+
+@GraphQLName("CXS_EventPropertiesFilter")
 public class CXSEventPropertiesFilter {
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java
index a6f8200..06e78f5 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java
@@ -22,6 +22,7 @@ import graphql.annotations.annotationTypes.GraphQLName;
 import java.util.ArrayList;
 import java.util.List;
 
+@GraphQLName("CXS_EventTypeInput")
 public class CXSEventTypeInput {
 
     private String id;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceInput.java
index 59d0fa9..bd95070 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceInput.java
@@ -17,7 +17,9 @@
 package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
+@GraphQLName("CXS_GeoDistanceInput")
 public class CXSGeoDistanceInput {
     @GraphQLField
     public CXSGeoPoint center;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceUnit.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceUnit.java
index 5db4d3e..ad3f08a 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceUnit.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceUnit.java
@@ -16,6 +16,9 @@
  */
 package org.apache.unomi.graphql;
 
+import graphql.annotations.annotationTypes.GraphQLName;
+
+@GraphQLName("CXS_GeoDistanceUnit")
 public enum CXSGeoDistanceUnit {
     METERS,
     KILOMETERS,
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPoint.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPoint.java
index bfa7c24..703a541 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPoint.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPoint.java
@@ -17,7 +17,9 @@
 package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
+@GraphQLName("CXS_GeoPoint")
 public class CXSGeoPoint {
 
     @GraphQLField
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointInput.java
index 19b0297..bd402c0 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointInput.java
@@ -17,7 +17,9 @@
 package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
+@GraphQLName("CXS_GeoPointInput")
 public class CXSGeoPointInput {
     @GraphQLField
     public float longitude;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSOrderByInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSOrderByInput.java
index a0221d2..dbe63c0 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSOrderByInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSOrderByInput.java
@@ -17,7 +17,9 @@
 package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
+@GraphQLName("CXS_OrderByInput")
 public class CXSOrderByInput {
 
     @GraphQLField
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProfilePropertiesFilter.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProfilePropertiesFilter.java
index c1eae63..ff005af 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProfilePropertiesFilter.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProfilePropertiesFilter.java
@@ -21,6 +21,7 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
+@GraphQLName("CXS_ProfilePropertiesFilter")
 public class CXSProfilePropertiesFilter {
 
     @GraphQLField
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProperties.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProperties.java
deleted file mode 100644
index 55a1b3e..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProperties.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;
-
-public class CXSProperties {
-
-    @GraphQLField
-    public String key;
-
-    @GraphQLField
-    public String value;
-}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
index dda0ea4..5662123 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
@@ -20,7 +20,7 @@ import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 import org.apache.unomi.graphql.propertytypes.*;
 
-@GraphQLName("CXSPropertyTypeInput")
+@GraphQLName("CXS_PropertyTypeInput")
 public class CXSPropertyTypeInput {
 
     public CXSPropertyTypeInput(
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
index 8f32019..52d1101 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
@@ -22,6 +22,7 @@ import org.apache.unomi.graphql.propertytypes.CXSPropertyType;
 
 import java.util.List;
 
+@GraphQLName("CXS_SetPropertyTypeInput")
 public class CXSSetPropertyTypeInput extends CXSPropertyType {
 
     private List<CXSPropertyTypeInput> properties;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSortOrder.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSortOrder.java
index ca0f3bd..0fbad2c 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSortOrder.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSortOrder.java
@@ -16,6 +16,9 @@
  */
 package org.apache.unomi.graphql;
 
+import graphql.annotations.annotationTypes.GraphQLName;
+
+@GraphQLName("CXS_SortOrder")
 public enum CXSSortOrder {
     ASC,
     DESC,
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSView.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSView.java
index ddc74b6..5ee0066 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSView.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSView.java
@@ -17,7 +17,9 @@
 package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
+@GraphQLName("CXS_view")
 public class CXSView {
     @GraphQLField
     public String name;
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
index da5546a..f5e5777 100644
--- 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
@@ -19,7 +19,10 @@ package org.apache.unomi.graphql.builders;
 import graphql.annotations.processor.GraphQLAnnotationsComponent;
 import graphql.annotations.processor.ProcessingElementsContainer;
 import graphql.schema.*;
-import org.apache.unomi.graphql.*;
+import org.apache.unomi.graphql.CXSEvent;
+import org.apache.unomi.graphql.CXSEventOccurrenceFilterInput;
+import org.apache.unomi.graphql.CXSEventType;
+import org.apache.unomi.graphql.PageInfo;
 import org.apache.unomi.graphql.propertytypes.*;
 
 import java.util.ArrayList;
@@ -52,16 +55,13 @@ public class CXSEventBuilders implements CXSBuilder {
     public void updateTypes() {
         Map<String,GraphQLType> typeRegistry = container.getTypeRegistry();
         typeRegistry.put("CXS_EventInput", buildCXSEventInputType());
-        typeRegistry.put(CXSEventOccurrenceFilterInput.class.getName(), annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSEventOccurrenceFilterInput.class, container));
+        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() {
@@ -237,14 +237,14 @@ public class CXSEventBuilders implements CXSBuilder {
     private void addDistanceFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
         inputTypeBuilder.field(newInputObjectField()
                 .name(propertyName + "_distance")
-                .type((GraphQLInputType) typeRegistry.get(CXSGeoDistanceInput.class.getName()))
+                .type((GraphQLInputType) typeRegistry.get("CXS_GeoDistanceInput"))
         );
     }
 
     private void addDateFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
         inputTypeBuilder.field(newInputObjectField()
                 .name(propertyName + "_between")
-                .type((GraphQLInputType) typeRegistry.get(CXSDateFilterInput.class.getName()))
+                .type((GraphQLInputType) typeRegistry.get("CXS_DateFilterInput"))
         );
     }
 
@@ -270,7 +270,7 @@ public class CXSEventBuilders implements CXSBuilder {
                 )
                 .field(newInputObjectField()
                         .name("eventOccurrence")
-                        .type((GraphQLInputType) typeRegistry.get(CXSEventOccurrenceFilterInput.class.getName()))
+                        .type((GraphQLInputType) typeRegistry.get("CXS_EventOccurrenceFilterInput"))
                 );
         return cxsEventFilterInputType.build();
     }
@@ -317,7 +317,7 @@ public class CXSEventBuilders implements CXSBuilder {
             } else if (cxsEventPropertyType instanceof CXSDatePropertyType) {
                 eventPropertyInputType = GraphQLString;
             } else if (cxsEventPropertyType instanceof CXSGeoPointPropertyType) {
-                eventPropertyInputType = (GraphQLInputType) typeRegistry.get(CXSGeoPoint.class.getName());
+                eventPropertyInputType = (GraphQLInputType) typeRegistry.get("CXS_GeoPoint");
             } else if (cxsEventPropertyType instanceof CXSSetPropertyType) {
                 eventPropertyInputType = buildCXSEventTypeInputProperty(cxsEventPropertyType.getName(), ((CXSSetPropertyType)cxsEventPropertyType).getProperties());
             }
@@ -389,7 +389,7 @@ public class CXSEventBuilders implements CXSBuilder {
                         })
                 )
                 .field(newFieldDefinition()
-                        .type((GraphQLOutputType) typeRegistry.get(CXSGeoPoint.class.getName()))
+                        .type((GraphQLOutputType) typeRegistry.get("CXS_GeoPoint"))
                         .name("location")
                         .description("The geo-point location where the event was fired.")
                         .dataFetcher(new DataFetcher() {
@@ -458,7 +458,7 @@ public class CXSEventBuilders implements CXSBuilder {
             } else if (cxsEventPropertyType instanceof CXSDatePropertyType) {
                 eventPropertyOutputType = GraphQLString;
             } else if (cxsEventPropertyType instanceof CXSGeoPointPropertyType) {
-                eventPropertyOutputType = (GraphQLOutputType) typeRegistry.get(CXSGeoPoint.class.getName());
+                eventPropertyOutputType = (GraphQLOutputType) typeRegistry.get("CXS_GeoPoint");
             } else if (cxsEventPropertyType instanceof CXSSetPropertyType) {
                 eventPropertyOutputType = buildEventOutputType(cxsEventPropertyType.getName(), ((CXSSetPropertyType)cxsEventPropertyType).getProperties());
             }
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 949f51e..a67cace 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
@@ -71,19 +71,17 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
 
         typeRegistry.put(PageInfo.class.getName(), annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(PageInfo.class, container));
 
-        typeRegistry.put(CXSGeoPoint.class.getName(), annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSGeoPoint.class, container));
-        typeRegistry.put(CXSSetPropertyType.class.getName(),annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSSetPropertyType.class, container));
-        typeRegistry.put(CXSEventType.class.getName(), annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSEventType.class, container));
+        typeRegistry.put("CXS_GeoPoint", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSGeoPoint.class, container));
+        typeRegistry.put("CXS_SetPropertyType",annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSSetPropertyType.class, container));
+        typeRegistry.put("CXS_EventType", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSEventType.class, container));
 
-        typeRegistry.put(CXSGeoDistanceInput.class.getName(), annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSGeoDistanceInput.class, container));
-        typeRegistry.put(CXSDateFilterInput.class.getName(), annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSDateFilterInput.class, container));
-        typeRegistry.put(CXSEventTypeInput.class.getName(), annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSEventTypeInput.class, container));
-        typeRegistry.put(CXSOrderByInput.class.getName(), annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSOrderByInput.class, container));
+        typeRegistry.put("CXS_GeoDistanceInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSGeoDistanceInput.class, container));
+        typeRegistry.put("CXS_DateFilterInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSDateFilterInput.class, container));
+        typeRegistry.put("CXS_EventTypeInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSEventTypeInput.class, container));
+        typeRegistry.put("CXS_OrderByInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSOrderByInput.class, container));
 
         typeRegistry.put("CXS_Query", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSQuery.class, container));
         typeRegistry.put("CXS_Mutation", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSMutation.class, container));
-        // typeRegistry.put("CXS_Query", buildCXSQueryOutputType());
-        // typeRegistry.put("CXS_Mutation", buildCXSMutationOutputType());
 
         cxsEventBuilders.updateTypes();
 
@@ -151,7 +149,7 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                 .name("CXS_Query")
                 .description("Root CXS query type")
                 .field(newFieldDefinition()
-                        .type(new GraphQLList(getOutputTypeFromRegistry(CXSEventType.class.getName())))
+                        .type(new GraphQLList(getOutputTypeFromRegistry("CXS_EventType")))
                         .name("getEventTypes")
                         .description("Retrieves the list of all the declared CXS event types in the Apache Unomi server")
                 )
@@ -169,7 +167,7 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                         )
                         .argument(newArgument()
                                 .name("orderBy")
-                                .type(getInputTypeFromRegistry(CXSOrderByInput.class.getName()))
+                                .type(getInputTypeFromRegistry("CXS_OrderByInput"))
                         )
                         .argument(newArgument()
                                 .name("first")
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSBooleanPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSBooleanPropertyType.java
index 75bc309..c50dd3b 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSBooleanPropertyType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSBooleanPropertyType.java
@@ -21,7 +21,7 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXSBooleanPropertyType")
+@GraphQLName("CXS_BooleanPropertyType")
 public class CXSBooleanPropertyType extends CXSPropertyType {
 
     private Boolean defaultValue;
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
index 4b4b403..bd5d0a1 100644
--- 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
@@ -21,6 +21,7 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
+@GraphQLName("CXS_DatePropertyType")
 public class CXSDatePropertyType extends CXSPropertyType {
 
     private String defaultValue;
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
index 6a37058..abd46b4 100644
--- 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
@@ -21,6 +21,7 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
+@GraphQLName("CXS_FloatPropertyType")
 public class CXSFloatPropertyType extends CXSPropertyType {
 
     private Float minValue;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSGeoPointPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSGeoPointPropertyType.java
index 94f2d97..a3935b4 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSGeoPointPropertyType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSGeoPointPropertyType.java
@@ -21,6 +21,7 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
+@GraphQLName("CXS_GeoPointPropertyType")
 public class CXSGeoPointPropertyType extends CXSPropertyType {
 
     private String defaultValue;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIdentifierPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIdentifierPropertyType.java
index 7207740..01435cb 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIdentifierPropertyType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIdentifierPropertyType.java
@@ -21,6 +21,7 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
+@GraphQLName("CXS_IdentifierPropertyType")
 public class CXSIdentifierPropertyType extends CXSPropertyType {
 
     private String regexp;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIntPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIntPropertyType.java
index 96c3322..99239ee 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIntPropertyType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIntPropertyType.java
@@ -21,6 +21,7 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
+@GraphQLName("CXS_IntPropertyType")
 public class CXSIntPropertyType extends CXSPropertyType {
 
     private Integer minValue;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSPropertyType.java
index 28aaf7e..ab2f9e4 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSPropertyType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSPropertyType.java
@@ -21,6 +21,7 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
+@GraphQLName("CXS_PropertyType")
 public class CXSPropertyType {
 
     private String id;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSSetPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSSetPropertyType.java
index 25e796c..befb5bd 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSSetPropertyType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSSetPropertyType.java
@@ -21,6 +21,7 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
+@GraphQLName("CXS_SetPropertyType")
 public class CXSSetPropertyType extends CXSPropertyType {
 
     private List<CXSPropertyType> properties;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSStringPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSStringPropertyType.java
index 7736d09..8604436 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSStringPropertyType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSStringPropertyType.java
@@ -21,6 +21,7 @@ import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
+@GraphQLName("CXS_StringPropertyType")
 public class CXSStringPropertyType extends CXSPropertyType {
 
     private String regexp;


[unomi] 13/15: UNOMI-180 Implement CXS GraphQL API - Update version numbers

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit f49281da0e2b962868ed61798d522d249f9ec26b
Author: Serge Huber <sh...@apache.org>
AuthorDate: Wed Nov 21 20:21:37 2018 +0100

    UNOMI-180 Implement CXS GraphQL API
    - Update version numbers
    
    Signed-off-by: Serge Huber <sh...@apache.org>
---
 graphql/cxs-impl/pom.xml      | 4 ++--
 graphql/karaf-feature/pom.xml | 8 ++++----
 graphql/pom.xml               | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

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 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-graphql</artifactId>
-        <version>1.3.0-incubating-SNAPSHOT</version>
+        <version>1.4.0-incubating-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -76,7 +76,7 @@
         <dependency>
             <groupId>org.apache.unomi</groupId>
             <artifactId>unomi-api</artifactId>
-            <version>1.3.0-incubating-SNAPSHOT</version>
+            <version>1.4.0-incubating-SNAPSHOT</version>
             <scope>provided</scope>
         </dependency>
     </dependencies>
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 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-graphql</artifactId>
-        <version>1.3.0-incubating-SNAPSHOT</version>
+        <version>1.4.0-incubating-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <packaging>feature</packaging>
 
-    <artifactId>cxs-graphql-feature</artifactId>
+    <artifactId>cdp-graphql-feature</artifactId>
     <name>Apache Unomi :: GraphQL API :: Karaf Feature</name>
     <description>Apache Unomi Context GraphQL API Karaf Feature</description>
 
@@ -113,8 +113,8 @@
 
         <dependency>
             <groupId>org.apache.unomi</groupId>
-                <artifactId>cxs-graphql-api-impl</artifactId>
-            <version>1.3.0-incubating-SNAPSHOT</version>
+                <artifactId>cdp-graphql-api-impl</artifactId>
+            <version>1.4.0-incubating-SNAPSHOT</version>
         </dependency>
 
     </dependencies>
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 @@
     <parent>
         <groupId>org.apache.unomi</groupId>
         <artifactId>unomi-root</artifactId>
-        <version>1.3.0-incubating-SNAPSHOT</version>
+        <version>1.4.0-incubating-SNAPSHOT</version>
     </parent>
 
     <artifactId>unomi-graphql</artifactId>


[unomi] 06/15: 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

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit 35853e8d265634cb7ca9e288b236bf3445a8e219
Author: Serge Huber <sh...@apache.org>
AuthorDate: Fri Jun 8 11:11:51 2018 +0200

    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 <sh...@apache.org>
---
 .../unomi/graphql/internal/CXSGraphQLProviderImpl.java       | 12 ++++++++++++
 1 file changed, 12 insertions(+)

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()))
                 );


[unomi] 14/15: UNOMI-180 Implement CXS GraphQL API - Update dependency versions to make the GraphQL framework work again

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit f6ffe38d137c4fc7151cbd4280d89a5727539f50
Author: Serge Huber <sh...@apache.org>
AuthorDate: Thu Nov 22 13:33:51 2018 +0100

    UNOMI-180 Implement CXS GraphQL API
    - Update dependency versions to make the GraphQL framework work again
    
    Signed-off-by: Serge Huber <sh...@apache.org>
---
 graphql/cxs-impl/pom.xml      |  2 +-
 graphql/karaf-feature/pom.xml | 16 ++++++++++------
 graphql/pom.xml               |  5 +++--
 3 files changed, 14 insertions(+), 9 deletions(-)

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 @@
 
     <dependencies>
         <dependency>
-            <groupId>com.graphql-java</groupId>
+            <groupId>com.graphql-java-kickstart</groupId>
             <artifactId>graphql-java-servlet</artifactId>
             <version>${graphql.java.servlet.version}</version>
             <scope>provided</scope>
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 @@
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-core</artifactId>
-            <version>2.8.6</version>
+            <version>${jackson.version}</version>
+            <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-annotations</artifactId>
-            <version>2.8.6</version>
+            <version>${jackson.version}</version>
+            <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
-            <version>2.8.6</version>
+            <version>${jackson.version}</version>
+            <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.datatype</groupId>
             <artifactId>jackson-datatype-jdk8</artifactId>
-            <version>2.8.4</version>
+            <version>${jackson.version}</version>
+            <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>com.google.guava</groupId>
@@ -70,7 +74,7 @@
         <dependency>
             <groupId>com.graphql-java</groupId>
             <artifactId>java-dataloader</artifactId>
-            <version>2.0.2</version>
+            <version>2.2.0</version>
         </dependency>
         <dependency>
             <groupId>org.reactivestreams</groupId>
@@ -80,7 +84,7 @@
 
 
         <dependency>
-            <groupId>com.graphql-java</groupId>
+            <groupId>com.graphql-java-kickstart</groupId>
             <artifactId>graphql-java-servlet</artifactId>
             <version>${graphql.java.servlet.version}</version>
             <exclusions>
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 @@
     <packaging>pom</packaging>
 
     <properties>
-        <graphql.java.servlet.version>5.0.1</graphql.java.servlet.version>
-        <graphql.java.version>8.0</graphql.java.version>
+        <graphql.java.servlet.version>7.1.0</graphql.java.servlet.version>
+        <graphql.java.version>11.0</graphql.java.version>
         <graphql.java.annotations.version>6.1</graphql.java.annotations.version>
+        <jackson.version>2.9.7</jackson.version>
     </properties>
 
     <modules>


[unomi] 11/15: UNOMI-180 Implement CXS GraphQL API - Modify the type generation to use "Input" suffix for input types instead of a prefix.

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit 5fe299e9b2f441ac57a14b8dbc797a71cdd59d76
Author: Serge Huber <sh...@apache.org>
AuthorDate: Sun Nov 18 23:50:09 2018 +0100

    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 <sh...@apache.org>
---
 graphql/cxs-impl/pom.xml                           |  6 +++
 .../apache/unomi/graphql/CXSGraphQLProvider.java   |  4 +-
 .../java/org/apache/unomi/graphql/CXSMutation.java | 22 ++++++-----
 .../apache/unomi/graphql/CXSProviderManager.java   |  4 ++
 .../java/org/apache/unomi/graphql/CXSQuery.java    | 45 +++++++++++++++++++++-
 .../unomi/graphql/builders/CXSEventBuilders.java   |  9 ++++-
 .../graphql/internal/CXSGraphQLProviderImpl.java   | 18 +++++++--
 .../graphql/internal/CXSProviderManagerImpl.java   | 23 +++++++++++
 .../propertytypes/CXSFloatPropertyType.java        | 18 ++++-----
 .../input/CXSDateFilter.java}                      |  6 +--
 .../input/CXSEventFilter.java}                     | 10 ++---
 .../graphql/{ => types/input}/CXSEventInput.java   |  4 +-
 .../input}/CXSEventOccurrenceFilterInput.java      |  4 +-
 .../{ => types/input}/CXSEventTypeInput.java       |  4 +-
 .../{ => types/input}/CXSGeoDistanceInput.java     |  8 ++--
 .../{ => types/input}/CXSGeoPointInput.java        |  8 ++--
 .../graphql/{ => types/input}/CXSOrderByInput.java |  5 ++-
 .../{ => types/input}/CXSPropertyTypeInput.java    |  4 +-
 .../input/CXSSegmentFilterInput.java}              | 26 ++++++++++---
 .../{ => types/input}/CXSSetPropertyTypeInput.java |  7 ++--
 .../unomi/graphql/{ => types/output}/CXSEvent.java |  2 +-
 .../{ => types/output}/CXSEventConnection.java     |  2 +-
 .../graphql/{ => types/output}/CXSEventEdge.java   |  2 +-
 .../graphql/{ => types/output}/CXSEventFilter.java |  2 +-
 .../output}/CXSEventOccurrenceFilter.java          |  2 +-
 .../{ => types/output}/CXSEventProperties.java     |  2 +-
 .../output}/CXSEventPropertiesFilter.java          |  2 +-
 .../graphql/{ => types/output}/CXSEventType.java   |  2 +-
 .../{ => types/output}/CXSGeoDistanceUnit.java     |  2 +-
 .../graphql/{ => types/output}/CXSGeoPoint.java    |  6 +--
 .../graphql/{ => types/output}/CXSSegment.java     |  2 +-
 .../{ => types/output}/CXSSegmentCondition.java    |  3 +-
 .../output/CXSSegmentConnection.java}              |  9 ++---
 .../output/CXSSegmentEdge.java}                    |  9 +++--
 .../graphql/{ => types/output}/CXSSortOrder.java   |  2 +-
 .../unomi/graphql/{ => types/output}/CXSView.java  |  2 +-
 .../unomi/graphql/{ => types/output}/PageInfo.java |  2 +-
 graphql/karaf-feature/pom.xml                      | 19 +++++++--
 graphql/pom.xml                                    |  6 +--
 39 files changed, 220 insertions(+), 93 deletions(-)

diff --git a/graphql/cxs-impl/pom.xml b/graphql/cxs-impl/pom.xml
index 3e29f66..22a1edd 100644
--- a/graphql/cxs-impl/pom.xml
+++ b/graphql/cxs-impl/pom.xml
@@ -73,6 +73,12 @@
             <version>1.7.21</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.unomi</groupId>
+            <artifactId>unomi-api</artifactId>
+            <version>1.3.0-incubating-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
     </dependencies>
 
 </project>
\ No newline at end of file
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
index 1636402..f5a62a3 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
@@ -16,11 +16,13 @@
  */
 package org.apache.unomi.graphql;
 
+import org.apache.unomi.graphql.types.output.CXSEventType;
+
 import java.util.Map;
 
 public interface CXSGraphQLProvider {
 
-    Map<String,CXSEventType> getEventTypes();
+    Map<String, CXSEventType> getEventTypes();
     CXSProviderManager getCxsProviderManager();
     void updateGraphQLTypes();
     void setCxsProviderManager(CXSProviderManager cxsProviderManager);
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java
index 9732de4..f7cb1e1 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java
@@ -20,9 +20,13 @@ import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 import graphql.schema.DataFetchingEnvironment;
 import org.apache.unomi.graphql.propertytypes.CXSIdentifierPropertyType;
-import org.apache.unomi.graphql.propertytypes.CXSPropertyType;
 import org.apache.unomi.graphql.propertytypes.CXSSetPropertyType;
 import org.apache.unomi.graphql.propertytypes.CXSStringPropertyType;
+import org.apache.unomi.graphql.types.input.CXSEventInput;
+import org.apache.unomi.graphql.types.input.CXSEventTypeInput;
+import org.apache.unomi.graphql.types.input.CXSPropertyTypeInput;
+import org.apache.unomi.graphql.types.input.CXSSetPropertyTypeInput;
+import org.apache.unomi.graphql.types.output.CXSEventType;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -41,7 +45,7 @@ public class CXSMutation {
 
         CXSEventType cxsEventType = new CXSEventType(cxsEventTypeInput.getId(), cxsEventTypeInput.getScope(), cxsEventTypeInput.getTypeName(), new ArrayList<>());
         for (CXSPropertyTypeInput propertyTypeInput : cxsEventTypeInput.getProperties()) {
-            CXSPropertyType propertyType = getPropertyType(propertyTypeInput);
+            org.apache.unomi.graphql.propertytypes.CXSPropertyType propertyType = getPropertyType(propertyTypeInput);
             cxsEventType.getProperties().add(propertyType);
         }
         cxsGraphQLProvider.getEventTypes().put(cxsEventType.getTypeName(), cxsEventType);
@@ -58,8 +62,8 @@ public class CXSMutation {
         return 0;
     }
 
-    private CXSPropertyType getPropertyType(CXSPropertyTypeInput cxsPropertyTypeInput) {
-        CXSPropertyType propertyType = null;
+    private org.apache.unomi.graphql.propertytypes.CXSPropertyType getPropertyType(CXSPropertyTypeInput cxsPropertyTypeInput) {
+        org.apache.unomi.graphql.propertytypes.CXSPropertyType propertyType = null;
         if (cxsPropertyTypeInput.identifierPropertyTypeInput != null) {
             propertyType = getIdentifierPropertyType(cxsPropertyTypeInput.identifierPropertyTypeInput);
         } else if (cxsPropertyTypeInput.stringPropertyTypeInput != null) {
@@ -70,12 +74,12 @@ public class CXSMutation {
         return propertyType;
     }
 
-    private CXSPropertyType getSetPropertyType(CXSSetPropertyTypeInput cxsSetPropertyTypeInput) {
-        List<CXSPropertyType> setProperties = null;
+    private org.apache.unomi.graphql.propertytypes.CXSPropertyType getSetPropertyType(CXSSetPropertyTypeInput cxsSetPropertyTypeInput) {
+        List<org.apache.unomi.graphql.propertytypes.CXSPropertyType> setProperties = null;
         if (cxsSetPropertyTypeInput.getProperties() != null) {
             setProperties = new ArrayList<>();
             for (CXSPropertyTypeInput setProperty : cxsSetPropertyTypeInput.getProperties()) {
-                CXSPropertyType subPropertyType = getPropertyType(setProperty);
+                org.apache.unomi.graphql.propertytypes.CXSPropertyType subPropertyType = getPropertyType(setProperty);
                 if (subPropertyType != null) {
                     setProperties.add(subPropertyType);
                 }
@@ -92,7 +96,7 @@ public class CXSMutation {
                 setProperties);
     }
 
-    private CXSPropertyType getStringPropertyType(CXSStringPropertyType stringPropertyType) {
+    private org.apache.unomi.graphql.propertytypes.CXSPropertyType getStringPropertyType(CXSStringPropertyType stringPropertyType) {
         return new CXSStringPropertyType(
                 stringPropertyType.getId(),
                 stringPropertyType.getName(),
@@ -106,7 +110,7 @@ public class CXSMutation {
                 );
     }
 
-    private CXSPropertyType getIdentifierPropertyType(CXSIdentifierPropertyType identifierPropertyType) {
+    private org.apache.unomi.graphql.propertytypes.CXSPropertyType getIdentifierPropertyType(CXSIdentifierPropertyType identifierPropertyType) {
         return new CXSIdentifierPropertyType(
                 identifierPropertyType.getId(),
                 identifierPropertyType.getName(),
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java
index 18c7533..66d4d93 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java
@@ -16,8 +16,12 @@
  */
 package org.apache.unomi.graphql;
 
+import org.apache.unomi.api.services.SegmentService;
+
 public interface CXSProviderManager {
 
     void refreshProviders();
 
+    SegmentService getSegmentService();
+
 }
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 7b548a9..728bb38 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
@@ -19,6 +19,14 @@ package org.apache.unomi.graphql;
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 import graphql.schema.DataFetchingEnvironment;
+import org.apache.unomi.api.conditions.Condition;
+import org.apache.unomi.api.query.Query;
+import org.apache.unomi.api.segments.Segment;
+import org.apache.unomi.api.services.SegmentService;
+import org.apache.unomi.graphql.types.input.CXSEventFilter;
+import org.apache.unomi.graphql.types.input.CXSOrderByInput;
+import org.apache.unomi.graphql.types.input.CXSSegmentFilterInput;
+import org.apache.unomi.graphql.types.output.*;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -43,7 +51,7 @@ public class CXSQuery {
     }
 
     @GraphQLField
-    public CXSEventConnection findEvents(@GraphQLName("filter") CXSEventFilterInput filter,
+    public CXSEventConnection findEvents(@GraphQLName("filter") CXSEventFilter filter,
                                          @GraphQLName("orderBy") CXSOrderByInput orderBy,
                                          DataFetchingEnvironment env) {
         env.getArgument("first");
@@ -52,7 +60,40 @@ public class CXSQuery {
     }
 
     @GraphQLField
+    public CXSSegmentConnection findSegments(@GraphQLName("filter") CXSSegmentFilterInput filter,
+                                             @GraphQLName("orderBy") CXSOrderByInput orderBy,
+                                             DataFetchingEnvironment env) {
+        SegmentService segmentService = cxsGraphQLProvider.getCxsProviderManager().getSegmentService();
+        Query query = new Query();
+        segmentService.getSegmentMetadatas(query);
+        return new CXSSegmentConnection();
+    }
+
+    @GraphQLField
     public CXSSegment getSegment(@GraphQLName("segmentId") String segmentId) {
-        return new CXSSegment();
+        SegmentService segmentService = cxsGraphQLProvider.getCxsProviderManager().getSegmentService();
+        Segment segment = segmentService.getSegmentDefinition(segmentId);
+        if (segment == null) {
+            return null;
+        }
+        CXSSegment cxsSegment = new CXSSegment();
+        cxsSegment.id = segment.getItemId();
+        cxsSegment.name = segment.getMetadata().getName();
+        CXSView cxsView = new CXSView();
+        cxsView.name = segment.getScope();
+        cxsSegment.view = cxsView;
+        cxsSegment.condition = getSegmentCondition(segment.getCondition());
+        return cxsSegment;
+    }
+
+    private CXSSegmentCondition getSegmentCondition(Condition segmentRootCondition) {
+        if (segmentRootCondition == null) {
+            return null;
+        }
+        // @todo translate the conditions into something that the CXS spec can work with.
+
+        // we probably have to scan the tree to find any event conditions and seperate them
+        // from the profile property conditions (what about session conditions ?)
+        return null;
     }
 }
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
index ff2a27e..8c616d4 100644
--- 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
@@ -19,8 +19,13 @@ package org.apache.unomi.graphql.builders;
 import graphql.annotations.processor.GraphQLAnnotationsComponent;
 import graphql.annotations.processor.ProcessingElementsContainer;
 import graphql.schema.*;
-import org.apache.unomi.graphql.*;
 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;
@@ -36,7 +41,7 @@ public class CXSEventBuilders implements CXSBuilder {
 
     private GraphQLAnnotationsComponent annotationsComponent;
     private ProcessingElementsContainer container;
-    private Map<String,CXSEventType> eventTypes;
+    private Map<String, CXSEventType> eventTypes;
     private Map<String,GraphQLType> typeRegistry;
 
     public CXSEventBuilders(GraphQLAnnotationsComponent annotationsComponent,
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 5880731..e5dc6ba 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
@@ -22,9 +22,19 @@ import graphql.schema.*;
 import graphql.servlet.GraphQLMutationProvider;
 import graphql.servlet.GraphQLQueryProvider;
 import graphql.servlet.GraphQLTypesProvider;
-import org.apache.unomi.graphql.*;
+import org.apache.unomi.graphql.CXSGraphQLProvider;
+import org.apache.unomi.graphql.CXSMutation;
+import org.apache.unomi.graphql.CXSProviderManager;
+import org.apache.unomi.graphql.CXSQuery;
 import org.apache.unomi.graphql.builders.CXSEventBuilders;
 import org.apache.unomi.graphql.propertytypes.CXSSetPropertyType;
+import org.apache.unomi.graphql.types.input.CXSDateFilter;
+import org.apache.unomi.graphql.types.input.CXSEventTypeInput;
+import org.apache.unomi.graphql.types.input.CXSGeoDistanceInput;
+import org.apache.unomi.graphql.types.input.CXSOrderByInput;
+import org.apache.unomi.graphql.types.output.CXSEventType;
+import org.apache.unomi.graphql.types.output.CXSGeoPoint;
+import org.apache.unomi.graphql.types.output.PageInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -46,11 +56,13 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
     private CXSEventBuilders cxsEventBuilders;
     private Map<String,GraphQLType> typeRegistry;
 
-    private Map<String,CXSEventType> eventTypes = new TreeMap<>();
+    private Map<String, CXSEventType> eventTypes = new TreeMap<>();
 
     public CXSGraphQLProviderImpl(GraphQLAnnotationsComponent annotationsComponent) {
         this.annotationsComponent = annotationsComponent;
         container = annotationsComponent.createContainer();
+        container.setInputPrefix("");
+        container.setInputSuffix("Input");
         typeRegistry = container.getTypeRegistry();
         cxsEventBuilders = new CXSEventBuilders(annotationsComponent, container, eventTypes);
         updateGraphQLTypes();
@@ -74,7 +86,7 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
         typeRegistry.put("CXS_EventType", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSEventType.class, container));
 
         typeRegistry.put("CXS_GeoDistanceInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSGeoDistanceInput.class, container));
-        typeRegistry.put("CXS_DateFilterInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSDateFilterInput.class, container));
+        typeRegistry.put("CXS_DateFilterInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSDateFilter.class, container));
         typeRegistry.put("CXS_EventTypeInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSEventTypeInput.class, container));
         typeRegistry.put("CXS_OrderByInput", annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSOrderByInput.class, container));
 
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
index 99d9d1f..cd7c56f 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
@@ -17,9 +17,11 @@
 package org.apache.unomi.graphql.internal;
 
 import graphql.annotations.processor.GraphQLAnnotationsComponent;
+import graphql.annotations.processor.retrievers.GraphQLFieldRetriever;
 import graphql.servlet.GraphQLMutationProvider;
 import graphql.servlet.GraphQLQueryProvider;
 import graphql.servlet.GraphQLTypesProvider;
+import org.apache.unomi.api.services.SegmentService;
 import org.apache.unomi.graphql.CXSGraphQLProvider;
 import org.apache.unomi.graphql.CXSProviderManager;
 import org.osgi.framework.BundleContext;
@@ -40,6 +42,9 @@ public class CXSProviderManagerImpl implements CXSProviderManager {
 
     private CXSGraphQLProvider cxsGraphQLProvider;
     private GraphQLAnnotationsComponent annotationsComponent;
+    private GraphQLFieldRetriever graphQLFieldRetriever;
+    private SegmentService segmentService;
+
     private ServiceRegistration<?> providerSR;
     private BundleContext bundleContext;
 
@@ -48,6 +53,24 @@ public class CXSProviderManagerImpl implements CXSProviderManager {
         this.annotationsComponent = annotationsComponent;
     }
 
+    @Reference
+    public void setGraphQLFieldRetriever(GraphQLFieldRetriever graphQLFieldRetriever) {
+        this.graphQLFieldRetriever = graphQLFieldRetriever;
+        if (graphQLFieldRetriever != null) {
+            graphQLFieldRetriever.setAlwaysPrettify(true);
+        }
+    }
+
+    @Reference
+    public void setSegmentService(SegmentService segmentService) {
+        this.segmentService = segmentService;
+    }
+
+    @Override
+    public SegmentService getSegmentService() {
+        return segmentService;
+    }
+
     @Activate
     void activate(
             ComponentContext componentContext,
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
index abd46b4..e53b28b 100644
--- 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
@@ -24,9 +24,9 @@ import java.util.List;
 @GraphQLName("CXS_FloatPropertyType")
 public class CXSFloatPropertyType extends CXSPropertyType {
 
-    private Float minValue;
-    private Float maxValue;
-    private Float defaultValue;
+    private Double minValue;
+    private Double maxValue;
+    private Double defaultValue;
 
     public CXSFloatPropertyType(@GraphQLName("id") String id,
                                 @GraphQLName("name") String name,
@@ -35,9 +35,9 @@ public class CXSFloatPropertyType extends CXSPropertyType {
                                 @GraphQLName("tags") List<String> tags,
                                 @GraphQLName("systemTags") List<String> systemTags,
                                 @GraphQLName("personalData") Boolean personalData,
-                                @GraphQLName("minValue") Float minValue,
-                                @GraphQLName("maxValue") Float maxValue,
-                                @GraphQLName("defaultValue") Float defaultValue) {
+                                @GraphQLName("minValue") Double minValue,
+                                @GraphQLName("maxValue") Double maxValue,
+                                @GraphQLName("defaultValue") Double defaultValue) {
         super(id, name, minOccurrences, maxOccurrences, tags, systemTags, personalData);
         this.minValue = minValue;
         this.maxValue = maxValue;
@@ -45,17 +45,17 @@ public class CXSFloatPropertyType extends CXSPropertyType {
     }
 
     @GraphQLField
-    public Float getMinValue() {
+    public Double getMinValue() {
         return minValue;
     }
 
     @GraphQLField
-    public Float getMaxValue() {
+    public Double getMaxValue() {
         return maxValue;
     }
 
     @GraphQLField
-    public Float getDefaultValue() {
+    public Double getDefaultValue() {
         return defaultValue;
     }
 }
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/types/input/CXSDateFilter.java
similarity index 91%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDateFilterInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSDateFilter.java
index c9e1d07..0a48393 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/types/input/CXSDateFilter.java
@@ -14,13 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.input;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXS_DateFilterInput")
-public class CXSDateFilterInput {
+@GraphQLName("CXS_DateFilter")
+public class CXSDateFilter {
     @GraphQLField
     public long after;
     @GraphQLField
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilterInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventFilter.java
similarity index 83%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilterInput.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventFilter.java
index 855a6ab..b699672 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilterInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventFilter.java
@@ -14,22 +14,22 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.input;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_EventFilterInput")
-public class CXSEventFilterInput {
+@GraphQLName("CXS_EventFilter")
+public class CXSEventFilter {
 
     @GraphQLField
     @GraphQLName("and")
-    public List<CXSEventFilterInput> andFilters;
+    public List<CXSEventFilter> andFilters;
 
     @GraphQLField
     @GraphQLName("or")
-    public List<CXSEventFilterInput> orFilters;
+    public List<CXSEventFilter> orFilters;
 
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventInput.java
similarity index 96%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventInput.java
index 473953b..2a076cd 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventInput.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.input;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
@@ -22,7 +22,7 @@ import graphql.annotations.annotationTypes.GraphQLName;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-@GraphQLName("CXS_EventInput")
+@GraphQLName("CXS_Event")
 public class CXSEventInput {
     private String id;
     private String eventType;
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/types/input/CXSEventOccurrenceFilterInput.java
similarity index 93%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilterInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventOccurrenceFilterInput.java
index 1ffaa19..ee74489 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilterInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventOccurrenceFilterInput.java
@@ -14,12 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.input;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXS_EventOccurrenceFilterInput")
+@GraphQLName("CXS_EventOccurrenceFilter")
 public class CXSEventOccurrenceFilterInput {
 
     @GraphQLField
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventTypeInput.java
similarity index 96%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventTypeInput.java
index 06e78f5..5f94aff 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSEventTypeInput.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.input;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
@@ -22,7 +22,7 @@ import graphql.annotations.annotationTypes.GraphQLName;
 import java.util.ArrayList;
 import java.util.List;
 
-@GraphQLName("CXS_EventTypeInput")
+@GraphQLName("CXS_EventType")
 public class CXSEventTypeInput {
 
     private String id;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoDistanceInput.java
similarity index 82%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoDistanceInput.java
index bd95070..7b8352a 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoDistanceInput.java
@@ -14,17 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.input;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
+import org.apache.unomi.graphql.types.output.CXSGeoDistanceUnit;
+import org.apache.unomi.graphql.types.output.CXSGeoPoint;
 
-@GraphQLName("CXS_GeoDistanceInput")
+@GraphQLName("CXS_GeoDistance")
 public class CXSGeoDistanceInput {
     @GraphQLField
     public CXSGeoPoint center;
     @GraphQLField
     public CXSGeoDistanceUnit unit;
     @GraphQLField
-    public float distance;
+    public Double distance;
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoPointInput.java
similarity index 88%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoPointInput.java
index bd402c0..772abb8 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSGeoPointInput.java
@@ -14,15 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.input;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXS_GeoPointInput")
+@GraphQLName("CXS_GeoPoint")
 public class CXSGeoPointInput {
     @GraphQLField
-    public float longitude;
+    public Double longitude;
     @GraphQLField
-    public float latitude;
+    public Double latitude;
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSOrderByInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSOrderByInput.java
similarity index 88%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSOrderByInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSOrderByInput.java
index dbe63c0..3ee5e1c 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSOrderByInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSOrderByInput.java
@@ -14,12 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+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_OrderByInput")
+@GraphQLName("CXS_OrderBy")
 public class CXSOrderByInput {
 
     @GraphQLField
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSPropertyTypeInput.java
similarity index 97%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSPropertyTypeInput.java
index 5662123..9917ca3 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSPropertyTypeInput.java
@@ -14,13 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.input;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 import org.apache.unomi.graphql.propertytypes.*;
 
-@GraphQLName("CXS_PropertyTypeInput")
+@GraphQLName("CXS_PropertyType")
 public class CXSPropertyTypeInput {
 
     public CXSPropertyTypeInput(
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilterInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSegmentFilterInput.java
similarity index 65%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilterInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSegmentFilterInput.java
index 855a6ab..95bbc9d 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilterInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSegmentFilterInput.java
@@ -14,22 +14,38 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.input;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_EventFilterInput")
-public class CXSEventFilterInput {
+@GraphQLName("CXS_SegmentFilter")
+public class CXSSegmentFilterInput {
 
     @GraphQLField
     @GraphQLName("and")
-    public List<CXSEventFilterInput> andFilters;
+    public List<CXSSegmentFilterInput> andFilters;
 
     @GraphQLField
     @GraphQLName("or")
-    public List<CXSEventFilterInput> orFilters;
+    public List<CXSSegmentFilterInput> orFilters;
+
+    @GraphQLField
+    @GraphQLName("view_equals")
+    public String viewEquals;
+
+    @GraphQLField
+    @GraphQLName("view_regexp")
+    public String viewRegexp;
+
+    @GraphQLField
+    @GraphQLName("name_equals")
+    public String nameEquals;
+
+    @GraphQLField
+    @GraphQLName("name_regexp")
+    public String nameRegexp;
 
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSetPropertyTypeInput.java
similarity index 90%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSetPropertyTypeInput.java
index 52d1101..ba762f9 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/input/CXSSetPropertyTypeInput.java
@@ -14,16 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.input;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
-import org.apache.unomi.graphql.propertytypes.CXSPropertyType;
 
 import java.util.List;
 
-@GraphQLName("CXS_SetPropertyTypeInput")
-public class CXSSetPropertyTypeInput extends CXSPropertyType {
+@GraphQLName("CXS_SetPropertyType")
+public class CXSSetPropertyTypeInput extends org.apache.unomi.graphql.propertytypes.CXSPropertyType {
 
     private List<CXSPropertyTypeInput> properties;
 
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/types/output/CXSEvent.java
similarity index 97%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEvent.java
index 6e71c28..738ef7e 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/types/output/CXSEvent.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
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/types/output/CXSEventConnection.java
similarity index 95%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventConnection.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventConnection.java
index 7974543..5852b8d 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventConnection.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventConnection.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventEdge.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventEdge.java
similarity index 95%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventEdge.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventEdge.java
index 3b81f0a..1be39a6 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventEdge.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventEdge.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilter.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventFilter.java
similarity index 96%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilter.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventFilter.java
index 82a3ebd..9d26663 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilter.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventFilter.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilter.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventOccurrenceFilter.java
similarity index 96%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilter.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventOccurrenceFilter.java
index 7abd342..7fac676 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilter.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventOccurrenceFilter.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventProperties.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventProperties.java
similarity index 96%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventProperties.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventProperties.java
index 95c0b1b..7431cf9 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventProperties.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventProperties.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventPropertiesFilter.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventPropertiesFilter.java
similarity index 95%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventPropertiesFilter.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventPropertiesFilter.java
index 45f9101..9580a51 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventPropertiesFilter.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventPropertiesFilter.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLName;
 
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventType.java
similarity index 97%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventType.java
index 2d4c5ae..38a7d4e 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSEventType.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceUnit.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoDistanceUnit.java
similarity index 95%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceUnit.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoDistanceUnit.java
index ad3f08a..8be9aee 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoDistanceUnit.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoDistanceUnit.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLName;
 
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPoint.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoPoint.java
similarity index 90%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPoint.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoPoint.java
index 703a541..12e3e0a 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPoint.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSGeoPoint.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
@@ -23,9 +23,9 @@ import graphql.annotations.annotationTypes.GraphQLName;
 public class CXSGeoPoint {
 
     @GraphQLField
-    public double latitude;
+    public Double latitude;
 
     @GraphQLField
-    public double longitude;
+    public Double longitude;
 
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegment.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegment.java
similarity index 96%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegment.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegment.java
index 4d81f90..5f64798 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegment.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegment.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegmentCondition.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentCondition.java
similarity index 92%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegmentCondition.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentCondition.java
index 37d3311..eca9f90 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegmentCondition.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentCondition.java
@@ -14,10 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
+import org.apache.unomi.graphql.CXSProfilePropertiesFilter;
 
 import java.util.List;
 
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/types/output/CXSSegmentConnection.java
similarity index 86%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventConnection.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentConnection.java
index 7974543..09fe699 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventConnection.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentConnection.java
@@ -14,18 +14,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_EventConnection")
-public class CXSEventConnection {
-
+@GraphQLName("CXS_SegmentConnection")
+public class CXSSegmentConnection {
     @GraphQLField
-    public List<CXSEventEdge> edges;
+    public List<CXSSegmentEdge> edges;
     @GraphQLField
     public PageInfo pageInfo;
 
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventEdge.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentEdge.java
similarity index 87%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventEdge.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentEdge.java
index 3b81f0a..f45b872 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventEdge.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSegmentEdge.java
@@ -14,16 +14,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXS_EventEdge")
-public class CXSEventEdge {
+@GraphQLName("CXS_SegmentEdge")
+public class CXSSegmentEdge {
 
     @GraphQLField
-    public CXSEvent node;
+    public CXSSegment edge;
+
     @GraphQLField
     public String cursor;
 
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSortOrder.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSortOrder.java
similarity index 95%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSortOrder.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSortOrder.java
index 0fbad2c..34d8c11 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSortOrder.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSSortOrder.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLName;
 
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSView.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSView.java
similarity index 95%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSView.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSView.java
index 5ee0066..a8e3616 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSView.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/CXSView.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/PageInfo.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/PageInfo.java
similarity index 95%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/PageInfo.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/PageInfo.java
index a49d774..7242a87 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/PageInfo.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/types/output/PageInfo.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.types.output;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 
diff --git a/graphql/karaf-feature/pom.xml b/graphql/karaf-feature/pom.xml
index c61df57..3179638 100644
--- a/graphql/karaf-feature/pom.xml
+++ b/graphql/karaf-feature/pom.xml
@@ -35,17 +35,17 @@
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-core</artifactId>
-            <version>2.8.4</version>
+            <version>2.8.6</version>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-annotations</artifactId>
-            <version>2.8.4</version>
+            <version>2.8.6</version>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
-            <version>2.8.4</version>
+            <version>2.8.6</version>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.datatype</groupId>
@@ -65,8 +65,19 @@
         <dependency>
             <groupId>org.antlr</groupId>
             <artifactId>antlr4-runtime</artifactId>
-            <version>4.5.1</version>
+            <version>4.7.1</version>
         </dependency>
+        <dependency>
+            <groupId>com.graphql-java</groupId>
+            <artifactId>java-dataloader</artifactId>
+            <version>2.0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.reactivestreams</groupId>
+            <artifactId>reactive-streams</artifactId>
+            <version>1.0.2</version>
+        </dependency>
+
 
         <dependency>
             <groupId>com.graphql-java</groupId>
diff --git a/graphql/pom.xml b/graphql/pom.xml
index ea476f6..25d0e3f 100644
--- a/graphql/pom.xml
+++ b/graphql/pom.xml
@@ -31,9 +31,9 @@
     <packaging>pom</packaging>
 
     <properties>
-        <graphql.java.servlet.version>4.7.0</graphql.java.servlet.version>
-        <graphql.java.version>6.0</graphql.java.version>
-        <graphql.java.annotations.version>5.1</graphql.java.annotations.version>
+        <graphql.java.servlet.version>5.0.1</graphql.java.servlet.version>
+        <graphql.java.version>8.0</graphql.java.version>
+        <graphql.java.annotations.version>6.1</graphql.java.annotations.version>
     </properties>
 
     <modules>


[unomi] 01/15: 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.

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit 6676615ef2747602200475168a4e39d13373489f
Author: Serge Huber <sh...@apache.org>
AuthorDate: Thu May 3 12:42:32 2018 +0200

    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 <sh...@apache.org>
---
 graphql/cxs-impl/pom.xml                           |  76 +++++++++
 .../java/org/apache/unomi/graphql/CXSEvent.java    |  59 +++++++
 .../org/apache/unomi/graphql/CXSEventType.java     |  26 +++
 .../java/org/apache/unomi/graphql/CXSGeoPoint.java |  29 ++++
 .../apache/unomi/graphql/CXSGraphQLProvider.java   |  21 +++
 .../org/apache/unomi/graphql/CXSProperties.java    |  28 +++
 .../org/apache/unomi/graphql/CXSPropertyType.java  |  32 ++++
 .../apache/unomi/graphql/CXSProviderManager.java   |  70 ++++++++
 .../graphql/internal/CXSGraphQLProviderImpl.java   | 188 +++++++++++++++++++++
 graphql/karaf-feature/pom.xml                      | 126 ++++++++++++++
 graphql/pom.xml                                    |  44 +++++
 pom.xml                                            |   1 +
 12 files changed, 700 insertions(+)

diff --git a/graphql/cxs-impl/pom.xml b/graphql/cxs-impl/pom.xml
new file mode 100644
index 0000000..ac3123d
--- /dev/null
+++ b/graphql/cxs-impl/pom.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<project xmlns="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">
+    <parent>
+        <groupId>org.apache.unomi</groupId>
+        <artifactId>unomi-graphql</artifactId>
+        <version>1.3.0-incubating-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>cxs-graphql-api-impl</artifactId>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.graphql-java</groupId>
+            <artifactId>graphql-java-servlet</artifactId>
+            <version>${graphql.java.servlet.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.graphql-java</groupId>
+            <artifactId>graphql-java</artifactId>
+            <version>${graphql.java.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.github.graphql-java</groupId>
+            <artifactId>graphql-java-annotations</artifactId>
+            <version>${graphql.java.annotations.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.enterprise</artifactId>
+            <version>6.0.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.core</artifactId>
+            <version>6.0.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.ds-annotations</artifactId>
+            <version>1.2.4</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>1.7.21</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+</project>
\ No newline at end of file
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 0000000..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<Object,Object> properties = new LinkedHashMap<>();
+    private CXSGeoPoint location;
+
+    public String getId() {
+        return id;
+    }
+
+    public String getEventType() {
+        return eventType;
+    }
+
+    public long getTimeStamp() {
+        return timeStamp;
+    }
+
+    public String getSubject() {
+        return subject;
+    }
+
+    public String getObject() {
+        return object;
+    }
+
+    public Map<Object, Object> getProperties() {
+        return properties;
+    }
+
+    public CXSGeoPoint getLocation() {
+        return location;
+    }
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java
new file mode 100644
index 0000000..43f04fb
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.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;
+
+import graphql.annotations.annotationTypes.GraphQLField;
+
+public class CXSEventType {
+
+    @GraphQLField
+    public String id;
+
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPoint.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPoint.java
new file mode 100644
index 0000000..bfa7c24
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPoint.java
@@ -0,0 +1,29 @@
+/*
+ * 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 CXSGeoPoint {
+
+    @GraphQLField
+    public double latitude;
+
+    @GraphQLField
+    public double longitude;
+
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
new file mode 100644
index 0000000..01f2636
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
@@ -0,0 +1,21 @@
+/*
+ * 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;
+
+public interface CXSGraphQLProvider {
+
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProperties.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProperties.java
new file mode 100644
index 0000000..55a1b3e
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProperties.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;
+
+import graphql.annotations.annotationTypes.GraphQLField;
+
+public class CXSProperties {
+
+    @GraphQLField
+    public String key;
+
+    @GraphQLField
+    public String value;
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyType.java
new file mode 100644
index 0000000..a55a04b
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyType.java
@@ -0,0 +1,32 @@
+/*
+ * 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.LinkedHashSet;
+import java.util.Set;
+
+public class CXSPropertyType {
+
+    private String id;
+    private String name;
+    private int minOccurrences = 0;
+    private int maxOccurrences = 1;
+    private Set<String> tags = new LinkedHashSet<>();
+    private Set<String> systemTags = new LinkedHashSet<>();
+    private boolean personalData = false;
+
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java
new file mode 100644
index 0000000..a341a9f
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java
@@ -0,0 +1,70 @@
+/*
+ * 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.servlet.GraphQLMutationProvider;
+import graphql.servlet.GraphQLQueryProvider;
+import graphql.servlet.GraphQLTypesProvider;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.component.ComponentContext;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Reference;
+
+import java.util.Map;
+
+@Component(
+        name="CXSProviderManager",
+        immediate = true
+)
+public class CXSProviderManager {
+
+    @Reference(name = "CXSGraphQLProvider")
+    private CXSGraphQLProvider cxsGraphQLProvider;
+    private ServiceRegistration<?> providerSR;
+    private BundleContext bundleContext;
+
+    @Activate
+    void activate(
+            ComponentContext componentContext,
+            BundleContext bundleContext,
+            Map<String,Object> config) {
+        this.bundleContext = bundleContext;
+    }
+
+    @Deactivate
+    void deactivate(
+            ComponentContext componentContext,
+            BundleContext bundleContext,
+            Map<String,Object> config) {
+    }
+
+    void refreshProviders() {
+        if (providerSR != null) {
+            providerSR.unregister();
+            providerSR = null;
+            providerSR = bundleContext.registerService(new String[] {
+                    GraphQLQueryProvider.class.getName(),
+                    GraphQLTypesProvider.class.getName(),
+                    GraphQLMutationProvider.class.getName()
+            }, cxsGraphQLProvider, null);
+        }
+    }
+
+}
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
new file mode 100644
index 0000000..e451dde
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java
@@ -0,0 +1,188 @@
+/*
+ * 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.internal;
+
+import graphql.annotations.processor.GraphQLAnnotations;
+import graphql.schema.*;
+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.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Deactivate;
+
+import java.util.*;
+
+import static graphql.Scalars.*;
+import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
+import static graphql.schema.GraphQLObjectType.newObject;
+
+@Component(
+        name = "CXSGraphQLProvider",
+        immediate = true
+)
+public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryProvider, GraphQLTypesProvider, GraphQLMutationProvider {
+
+    private Map<String,GraphQLOutputType> registeredOutputTypes = new TreeMap<>();
+
+    @Activate
+    void activate(
+            ComponentContext cc,
+            BundleContext bc,
+            Map<String,Object> config) {
+
+        registeredOutputTypes.put(CXSGeoPoint.class.getName(), GraphQLAnnotations.object(CXSGeoPoint.class));
+        registeredOutputTypes.put(CXSProperties.class.getName(), GraphQLAnnotations.object(CXSProperties.class));
+        registeredOutputTypes.put(CXSEventType.class.getName(), GraphQLAnnotations.object(CXSEventType.class));
+
+        registeredOutputTypes.put("CXS_Event", buildCXSEventOutputType());
+        registeredOutputTypes.put("CXS_Query", buildCXSQueryOutputType());
+    }
+
+    @Deactivate
+    void deactivate(
+            ComponentContext cc,
+            BundleContext bc,
+            Map<String,Object> config) {
+
+        registeredOutputTypes.clear();
+    }
+
+    @Override
+    public Collection<GraphQLFieldDefinition> getQueries() {
+        List<GraphQLFieldDefinition> fieldDefinitions = new ArrayList<GraphQLFieldDefinition>();
+        fieldDefinitions.add(newFieldDefinition()
+                .type(registeredOutputTypes.get("CXS_Query"))
+                .name("cxs")
+                .description("Root field for all CXS queries")
+                .dataFetcher(new DataFetcher() {
+                    public Object get(DataFetchingEnvironment environment) {
+                        Map<String,Object> map = environment.getContext();
+                        return map.keySet();
+                    }
+                }).build());
+        return fieldDefinitions;
+    }
+
+    @Override
+    public Collection<GraphQLType> getTypes() {
+        return new ArrayList<>();
+    }
+
+    @Override
+    public Collection<GraphQLFieldDefinition> getMutations() {
+        return new ArrayList<>();
+    }
+
+    private GraphQLOutputType buildCXSQueryOutputType() {
+        return newObject()
+                .name("CXS_Query")
+                .description("Root CXS query type")
+                .field(newFieldDefinition()
+                        .type(new GraphQLList(registeredOutputTypes.get(CXSEventType.class.getName())))
+                        .name("getEventTypes")
+                        .description("Retrieves the list of all the declared CXS event types in the Apache Unomi server")
+                )
+                .build();
+    }
+
+
+    private GraphQLOutputType buildCXSEventOutputType() {
+        return newObject()
+                .name("CXS_Event")
+                .description("An event is generated by user interacting with the Context Server")
+                .field(newFieldDefinition()
+                        .type(GraphQLID)
+                        .name("id")
+                        .description("A unique identifier for the event")
+                        .dataFetcher(new DataFetcher() {
+                            public Object get(DataFetchingEnvironment environment) {
+                                CXSEvent CXSEvent = environment.getSource();
+                                return CXSEvent.getId();
+                            }
+                        })
+                )
+                .field(newFieldDefinition()
+                        .type(GraphQLString)
+                        .name("eventType")
+                        .description("An identifier for the event type")
+                        .dataFetcher(new DataFetcher() {
+                            public Object get(DataFetchingEnvironment environment) {
+                                CXSEvent CXSEvent = environment.getSource();
+                                return CXSEvent.getEventType();
+                            }
+                        })
+                )
+                .field(newFieldDefinition()
+                        .type(GraphQLLong)
+                        .name("timestamp")
+                        .description("The difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.")
+                        .dataFetcher(new DataFetcher() {
+                            public Object get(DataFetchingEnvironment environment) {
+                                CXSEvent CXSEvent = environment.getSource();
+                                return CXSEvent.getTimeStamp();
+                            }
+                        }))
+                .field(newFieldDefinition()
+                        .type(GraphQLString)
+                        .name("subject")
+                        .description("The entity that has fired the event (using the profile)")
+                        .dataFetcher(new DataFetcher() {
+                            public Object get(DataFetchingEnvironment environment) {
+                                CXSEvent CXSEvent = environment.getSource();
+                                return CXSEvent.getSubject();
+                            }
+                        }))
+                .field(newFieldDefinition()
+                        .type(GraphQLString)
+                        .name("object")
+                        .description("The object on which the event was fired.")
+                        .dataFetcher(new DataFetcher() {
+                            public Object get(DataFetchingEnvironment environment) {
+                                CXSEvent CXSEvent = environment.getSource();
+                                return CXSEvent.getObject();
+                            }
+                        })
+                )
+                .field(newFieldDefinition()
+                        .type(registeredOutputTypes.get(CXSGeoPoint.class.getName()))
+                        .name("location")
+                        .description("The geo-point location where the event was fired.")
+                        .dataFetcher(new DataFetcher() {
+                            public Object get(DataFetchingEnvironment environment) {
+                                CXSEvent CXSEvent = environment.getSource();
+                                return CXSEvent.getLocation();
+                            }
+                        })
+                )
+                .field(newFieldDefinition()
+                        .type(new GraphQLList(registeredOutputTypes.get(CXSProperties.class.getName())))
+                        .name("properties")
+                        .description("Generic properties for the event")
+                        .dataFetcher(new DataFetcher() {
+                            public Object get(DataFetchingEnvironment environment) {
+                                CXSEvent CXSEvent = environment.getSource();
+                                return new ArrayList<Map.Entry<Object,Object>>(CXSEvent.getProperties().entrySet());
+                            }
+                        })
+                )
+                .build();
+    }
+}
diff --git a/graphql/karaf-feature/pom.xml b/graphql/karaf-feature/pom.xml
new file mode 100644
index 0000000..011e1eb
--- /dev/null
+++ b/graphql/karaf-feature/pom.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<project xmlns="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">
+    <parent>
+        <groupId>org.apache.unomi</groupId>
+        <artifactId>unomi-graphql</artifactId>
+        <version>1.3.0-incubating-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>feature</packaging>
+
+    <artifactId>cxs-graphql-feature</artifactId>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-core</artifactId>
+            <version>2.8.4</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+            <version>2.8.4</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+            <version>2.8.4</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.datatype</groupId>
+            <artifactId>jackson-datatype-jdk8</artifactId>
+            <version>2.8.4</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>20.0</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+            <version>1.3.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.antlr</groupId>
+            <artifactId>antlr4-runtime</artifactId>
+            <version>4.5.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.graphql-java</groupId>
+            <artifactId>graphql-java-servlet</artifactId>
+            <version>${graphql.java.servlet.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>javax.servlet-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.graphql-java</groupId>
+            <artifactId>graphql-java</artifactId>
+            <version>${graphql.java.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-api</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>io.github.graphql-java</groupId>
+            <artifactId>graphql-java-annotations</artifactId>
+            <version>${graphql.java.annotations.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.unomi</groupId>
+                <artifactId>cxs-graphql-api-impl</artifactId>
+            <version>1.3.0-incubating-SNAPSHOT</version>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <version>${version.karaf}</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <startLevel>80</startLevel>
+                    <addTransitiveFeatures>true</addTransitiveFeatures>
+                    <includeTransitiveDependency>true</includeTransitiveDependency>
+                </configuration>
+            </plugin>
+        </plugins>
+
+    </build>
+
+</project>
\ No newline at end of file
diff --git a/graphql/pom.xml b/graphql/pom.xml
new file mode 100644
index 0000000..bc03766
--- /dev/null
+++ b/graphql/pom.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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
+  -->
+
+<project xmlns="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">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.unomi</groupId>
+        <artifactId>unomi-root</artifactId>
+        <version>1.3.0-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>unomi-graphql</artifactId>
+    <name>Apache Unomi :: GraphQL API</name>
+    <description>Apache Unomi Context GraphQL API</description>
+    <packaging>pom</packaging>
+
+    <properties>
+        <graphql.java.servlet.version>4.7.0</graphql.java.servlet.version>
+        <graphql.java.version>6.0</graphql.java.version>
+        <graphql.java.annotations.version>5.1</graphql.java.annotations.version>
+    </properties>
+
+    <modules>
+        <module>cxs-impl</module>
+        <module>karaf-feature</module>
+    </modules>
+
+</project>
diff --git a/pom.xml b/pom.xml
index 8ba671b..172bb27 100644
--- a/pom.xml
+++ b/pom.xml
@@ -923,6 +923,7 @@
         <module>persistence-elasticsearch</module>
         <module>services</module>
         <module>rest</module>
+        <module>graphql</module>
         <module>wab</module>
         <module>plugins</module>
         <module>extensions</module>


[unomi] 08/15: UNOMI-180 Implement CXS GraphQL API Get event type creation to work (partially, the event GraphQL schema types are not yet properly modified)

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit ab9e96f5b17e80bcb03d7b90bc346a68367cb683
Author: Serge Huber <sh...@apache.org>
AuthorDate: Fri Jul 27 17:45:05 2018 +0200

    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 <sh...@apache.org>
---
 .../unomi/graphql/CXSBooleanPropertyType.java      |  28 -----
 .../apache/unomi/graphql/CXSDatePropertyType.java  |  26 -----
 .../org/apache/unomi/graphql/CXSEventType.java     |  34 +++++-
 .../apache/unomi/graphql/CXSEventTypeInput.java    |  33 +++++-
 .../apache/unomi/graphql/CXSFloatPropertyType.java |  30 -----
 .../unomi/graphql/CXSGeoPointPropertyType.java     |  25 ----
 .../unomi/graphql/CXSIdentifierPropertyType.java   |  28 -----
 .../apache/unomi/graphql/CXSIntPropertyType.java   |  30 -----
 .../java/org/apache/unomi/graphql/CXSMutation.java |  88 +++++++-------
 .../org/apache/unomi/graphql/CXSPropertyType.java  |  40 -------
 .../apache/unomi/graphql/CXSPropertyTypeInput.java |  20 ++++
 .../apache/unomi/graphql/CXSSetPropertyType.java   |  27 -----
 .../unomi/graphql/CXSSetPropertyTypeInput.java     |  21 +++-
 .../unomi/graphql/CXSStringPropertyType.java       |  28 -----
 .../unomi/graphql/builders/CXSEventBuilders.java   |  31 ++---
 .../graphql/internal/CXSGraphQLProviderImpl.java   | 127 ++-------------------
 .../graphql/internal/CXSProviderManagerImpl.java   |   2 -
 .../propertytypes/CXSBooleanPropertyType.java      |  51 +++++++++
 .../CXSDatePropertyType.java}                      |  29 +++--
 .../propertytypes/CXSFloatPropertyType.java        |  60 ++++++++++
 .../propertytypes/CXSGeoPointPropertyType.java     |  44 +++++++
 .../propertytypes/CXSIdentifierPropertyType.java   |  52 +++++++++
 .../graphql/propertytypes/CXSIntPropertyType.java  |  60 ++++++++++
 .../graphql/propertytypes/CXSPropertyType.java     |  94 +++++++++++++++
 .../graphql/propertytypes/CXSSetPropertyType.java  |  44 +++++++
 .../propertytypes/CXSStringPropertyType.java       |  53 +++++++++
 26 files changed, 644 insertions(+), 461 deletions(-)

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..0000000
--- 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;
-
-}
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..0000000
--- 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 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 CXSDatePropertyType extends CXSPropertyType {
-
-    @GraphQLField
-    public String defaultValue;
-
-}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java
index a7c1c2c..2d4c5ae 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java
@@ -18,22 +18,46 @@ package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
+import org.apache.unomi.graphql.propertytypes.CXSPropertyType;
 
+import java.util.ArrayList;
 import java.util.List;
 
 @GraphQLName("CXS_EventType")
 public class CXSEventType {
 
-    @GraphQLField
-    public String id;
+    private String id;
+    private String scope;
+    private String typeName;
+    private List<CXSPropertyType> properties = new ArrayList<>();
+
+    public CXSEventType(@GraphQLName("id") String id,
+                        @GraphQLName("scope") String scope,
+                        @GraphQLName("typeName") String typeName,
+                        @GraphQLName("properties") List<CXSPropertyType> properties) {
+        this.id = id;
+        this.scope = scope;
+        this.typeName = typeName;
+        this.properties = properties;
+    }
 
     @GraphQLField
-    public String scope;
+    public String getId() {
+        return id;
+    }
 
     @GraphQLField
-    public String typeName;
+    public String getScope() {
+        return scope;
+    }
 
     @GraphQLField
-    public List<CXSPropertyType> properties;
+    public String getTypeName() {
+        return typeName;
+    }
 
+    @GraphQLField
+    public List<CXSPropertyType> getProperties() {
+        return properties;
+    }
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java
index b84175f..a6f8200 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventTypeInput.java
@@ -17,20 +17,45 @@
 package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
+import java.util.ArrayList;
 import java.util.List;
 
 public class CXSEventTypeInput {
 
+    private String id;
+    private String scope;
+    private String typeName;
+    private List<CXSPropertyTypeInput> properties = new ArrayList<>();
+
+    public CXSEventTypeInput(@GraphQLName("id") String id,
+                             @GraphQLName("scope") String scope,
+                             @GraphQLName("typeName") String typeName,
+                             @GraphQLName("properties") List<CXSPropertyTypeInput> properties) {
+        this.id = id;
+        this.scope = scope;
+        this.typeName = typeName;
+        this.properties = properties;
+    }
+
     @GraphQLField
-    public String id;
+    public String getId() {
+        return id;
+    }
 
     @GraphQLField
-    public String scope;
+    public String getScope() {
+        return scope;
+    }
 
     @GraphQLField
-    public String typeName;
+    public String getTypeName() {
+        return typeName;
+    }
 
     @GraphQLField
-    public List<CXSPropertyTypeInput> properties;
+    public List<CXSPropertyTypeInput> getProperties() {
+        return properties;
+    }
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSFloatPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSFloatPropertyType.java
deleted file mode 100644
index 229b8db..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSFloatPropertyType.java
+++ /dev/null
@@ -1,30 +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;
-
-public class CXSFloatPropertyType extends CXSPropertyType {
-
-    @GraphQLField
-    public float minValue;
-    @GraphQLField
-    public float maxValue;
-    @GraphQLField
-    public float defaultValue;
-
-}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointPropertyType.java
deleted file mode 100644
index ce218c8..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointPropertyType.java
+++ /dev/null
@@ -1,25 +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;
-
-public class CXSGeoPointPropertyType extends CXSPropertyType {
-
-    @GraphQLField
-    public String defaultValue;
-}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIdentifierPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIdentifierPropertyType.java
deleted file mode 100644
index 11f0742..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIdentifierPropertyType.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;
-
-public class CXSIdentifierPropertyType extends CXSPropertyType {
-
-    @GraphQLField
-    public String regexp;
-    @GraphQLField
-    public String defaultValue;
-
-}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIntPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIntPropertyType.java
deleted file mode 100644
index c7c904f..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIntPropertyType.java
+++ /dev/null
@@ -1,30 +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;
-
-public class CXSIntPropertyType extends CXSPropertyType {
-
-    @GraphQLField
-    public int minValue;
-    @GraphQLField
-    public int maxValue;
-    @GraphQLField
-    public int defaultValue;
-
-}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java
index e3a4dce..9732de4 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java
@@ -19,6 +19,10 @@ package org.apache.unomi.graphql;
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 import graphql.schema.DataFetchingEnvironment;
+import org.apache.unomi.graphql.propertytypes.CXSIdentifierPropertyType;
+import org.apache.unomi.graphql.propertytypes.CXSPropertyType;
+import org.apache.unomi.graphql.propertytypes.CXSSetPropertyType;
+import org.apache.unomi.graphql.propertytypes.CXSStringPropertyType;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -26,19 +30,21 @@ import java.util.List;
 @GraphQLName("CXS_Mutation")
 public class CXSMutation {
 
+    CXSGraphQLProvider cxsGraphQLProvider;
+
+    public CXSMutation(CXSGraphQLProvider cxsGraphQLProvider) {
+        this.cxsGraphQLProvider = cxsGraphQLProvider;
+    }
+
     @GraphQLField
     public CXSEventType createOrUpdateEventType(DataFetchingEnvironment env, @GraphQLName("eventType") CXSEventTypeInput cxsEventTypeInput) {
 
-        CXSGraphQLProvider cxsGraphQLProvider = null;
-        CXSEventType cxsEventType = new CXSEventType();
-        cxsEventType.id = cxsEventTypeInput.id;
-        cxsEventType.typeName = cxsEventTypeInput.scope;
-        cxsEventType.properties = new ArrayList<>();
-        for (CXSPropertyTypeInput propertyTypeInput : cxsEventTypeInput.properties) {
+        CXSEventType cxsEventType = new CXSEventType(cxsEventTypeInput.getId(), cxsEventTypeInput.getScope(), cxsEventTypeInput.getTypeName(), new ArrayList<>());
+        for (CXSPropertyTypeInput propertyTypeInput : cxsEventTypeInput.getProperties()) {
             CXSPropertyType propertyType = getPropertyType(propertyTypeInput);
-            cxsEventType.properties.add(propertyType);
+            cxsEventType.getProperties().add(propertyType);
         }
-        cxsGraphQLProvider.getEventTypes().put(cxsEventType.typeName, cxsEventType);
+        cxsGraphQLProvider.getEventTypes().put(cxsEventType.getTypeName(), cxsEventType);
         cxsGraphQLProvider.updateGraphQLTypes();
         if (cxsGraphQLProvider.getCxsProviderManager() != null) {
             cxsGraphQLProvider.getCxsProviderManager().refreshProviders();
@@ -65,49 +71,53 @@ public class CXSMutation {
     }
 
     private CXSPropertyType getSetPropertyType(CXSSetPropertyTypeInput cxsSetPropertyTypeInput) {
-        CXSSetPropertyType cxsSetPropertyType = new CXSSetPropertyType();
-
-        populateCommonProperties(cxsSetPropertyTypeInput, cxsSetPropertyType);
-        if (cxsSetPropertyTypeInput.properties != null) {
-            List<CXSPropertyType> setProperties = new ArrayList<>();
-            for (CXSPropertyTypeInput setProperty : cxsSetPropertyTypeInput.properties) {
+        List<CXSPropertyType> setProperties = null;
+        if (cxsSetPropertyTypeInput.getProperties() != null) {
+            setProperties = new ArrayList<>();
+            for (CXSPropertyTypeInput setProperty : cxsSetPropertyTypeInput.getProperties()) {
                 CXSPropertyType subPropertyType = getPropertyType(setProperty);
                 if (subPropertyType != null) {
                     setProperties.add(subPropertyType);
                 }
             }
-            cxsSetPropertyType.properties = setProperties;
         }
-        return cxsSetPropertyType;
+        return new CXSSetPropertyType(
+                cxsSetPropertyTypeInput.getId(),
+                cxsSetPropertyTypeInput.getName(),
+                cxsSetPropertyTypeInput.getMinOccurrences(),
+                cxsSetPropertyTypeInput.getMaxOccurrences(),
+                cxsSetPropertyTypeInput.getTags(),
+                cxsSetPropertyTypeInput.getSystemTags(),
+                cxsSetPropertyTypeInput.isPersonalData(),
+                setProperties);
     }
 
     private CXSPropertyType getStringPropertyType(CXSStringPropertyType stringPropertyType) {
-        CXSStringPropertyType cxsStringPropertyType = new CXSStringPropertyType();
-        populateCommonProperties(stringPropertyType, cxsStringPropertyType);
-        cxsStringPropertyType.defaultValue = stringPropertyType.defaultValue;
-        cxsStringPropertyType.regexp = stringPropertyType.regexp;
-        return cxsStringPropertyType;
+        return new CXSStringPropertyType(
+                stringPropertyType.getId(),
+                stringPropertyType.getName(),
+                stringPropertyType.getMinOccurrences(),
+                stringPropertyType.getMaxOccurrences(),
+                stringPropertyType.getTags(),
+                stringPropertyType.getSystemTags(),
+                stringPropertyType.isPersonalData(),
+                stringPropertyType.getRegexp(),
+                stringPropertyType.getDefaultValue()
+                );
     }
 
     private CXSPropertyType getIdentifierPropertyType(CXSIdentifierPropertyType identifierPropertyType) {
-        CXSIdentifierPropertyType cxsIdentifierPropertyType = new CXSIdentifierPropertyType();
-        populateCommonProperties(identifierPropertyType, cxsIdentifierPropertyType);
-        cxsIdentifierPropertyType.defaultValue = identifierPropertyType.defaultValue;
-        cxsIdentifierPropertyType.regexp = identifierPropertyType.regexp;
-        return cxsIdentifierPropertyType;
-    }
-
-    private void populateCommonProperties(CXSPropertyType source, CXSPropertyType destination) {
-        if (source == null) {
-            return;
-        }
-        destination.id = source.id;
-        destination.name = source.name;
-        destination.personalData = source.personalData;
-        destination.systemTags = source.systemTags;
-        destination.tags = source.tags;
-        destination.minOccurrences = source.minOccurrences;
-        destination.maxOccurrences = source.maxOccurrences;
+        return new CXSIdentifierPropertyType(
+                identifierPropertyType.getId(),
+                identifierPropertyType.getName(),
+                identifierPropertyType.getMinOccurrences(),
+                identifierPropertyType.getMaxOccurrences(),
+                identifierPropertyType.getTags(),
+                identifierPropertyType.getSystemTags(),
+                identifierPropertyType.isPersonalData(),
+                identifierPropertyType.getRegexp(),
+                identifierPropertyType.getDefaultValue()
+        );
     }
 
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyType.java
deleted file mode 100644
index 641eff4..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyType.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 CXSPropertyType {
-
-    @GraphQLField
-    public String id;
-    @GraphQLField
-    public String name;
-    @GraphQLField
-    public int minOccurrences;
-    @GraphQLField
-    public int maxOccurrences;
-    @GraphQLField
-    public List<String> tags;
-    @GraphQLField
-    public List<String> systemTags;
-    @GraphQLField
-    public boolean personalData;
-
-}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
index 48eadec..dda0ea4 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
@@ -18,10 +18,30 @@ package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
+import org.apache.unomi.graphql.propertytypes.*;
 
 @GraphQLName("CXSPropertyTypeInput")
 public class CXSPropertyTypeInput {
 
+    public CXSPropertyTypeInput(
+            @GraphQLName("identifier") CXSIdentifierPropertyType identifierPropertyTypeInput,
+            @GraphQLName("string") CXSStringPropertyType stringPropertyTypeInput,
+            @GraphQLName("int") CXSIntPropertyType integerPropertyTypeInput,
+            @GraphQLName("float") CXSFloatPropertyType floatPropertyTypeInput,
+            @GraphQLName("date") CXSDatePropertyType datePropertyTypeInput,
+            @GraphQLName("boolean") CXSBooleanPropertyType booleanPropertyTypeInput,
+            @GraphQLName("geopoint") CXSGeoPointPropertyType geoPointPropertyTypeInput,
+            @GraphQLName("set") CXSSetPropertyTypeInput setPropertyTypeInput) {
+        this.identifierPropertyTypeInput = identifierPropertyTypeInput;
+        this.stringPropertyTypeInput = stringPropertyTypeInput;
+        this.integerPropertyTypeInput = integerPropertyTypeInput;
+        this.floatPropertyTypeInput = floatPropertyTypeInput;
+        this.datePropertyTypeInput = datePropertyTypeInput;
+        this.booleanPropertyTypeInput = booleanPropertyTypeInput;
+        this.geoPointPropertyTypeInput = geoPointPropertyTypeInput;
+        this.setPropertyTypeInput = setPropertyTypeInput;
+    }
+
     @GraphQLField
     @GraphQLName("identifier")
     public CXSIdentifierPropertyType identifierPropertyTypeInput;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyType.java
deleted file mode 100644
index 3c054ae..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyType.java
+++ /dev/null
@@ -1,27 +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 CXSSetPropertyType extends CXSPropertyType {
-
-    @GraphQLField
-    public List<CXSPropertyType> properties;
-}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
index 2f0de04..8f32019 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
@@ -17,12 +17,29 @@
 package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
+import org.apache.unomi.graphql.propertytypes.CXSPropertyType;
 
 import java.util.List;
 
 public class CXSSetPropertyTypeInput extends CXSPropertyType {
 
-    @GraphQLField
-    public List<CXSPropertyTypeInput> properties;
+    private List<CXSPropertyTypeInput> properties;
+
+    public CXSSetPropertyTypeInput(@GraphQLName("id") String id,
+                                   @GraphQLName("name") String name,
+                                   @GraphQLName("minOccurrences") Integer minOccurrences,
+                                   @GraphQLName("maxOccurrences") Integer maxOccurrences,
+                                   @GraphQLName("tags") List<String> tags,
+                                   @GraphQLName("systemTags") List<String> systemTags,
+                                   @GraphQLName("personalData") Boolean personalData,
+                                   @GraphQLName("properties") List<CXSPropertyTypeInput> properties) {
+        super(id, name, minOccurrences, maxOccurrences, tags, systemTags, personalData);
+        this.properties = properties;
+    }
 
+    @GraphQLField
+    public List<CXSPropertyTypeInput> getProperties() {
+        return properties;
+    }
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSStringPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSStringPropertyType.java
deleted file mode 100644
index 2a4ef90..0000000
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSStringPropertyType.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;
-
-public class CXSStringPropertyType extends CXSPropertyType {
-
-    @GraphQLField
-    public String regexp;
-    @GraphQLField
-    public String defaultValue;
-
-}
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
index bc1d4f7..da5546a 100644
--- 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
@@ -20,6 +20,7 @@ import graphql.annotations.processor.GraphQLAnnotationsComponent;
 import graphql.annotations.processor.ProcessingElementsContainer;
 import graphql.schema.*;
 import org.apache.unomi.graphql.*;
+import org.apache.unomi.graphql.propertytypes.*;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -116,7 +117,7 @@ public class CXSEventBuilders implements CXSBuilder {
 
     private void generateEventTypesFilters(GraphQLInputObjectType.Builder cxsEventPropertiesFilterInput) {
         for (Map.Entry<String,CXSEventType> eventTypeEntry : eventTypes.entrySet()) {
-            addSetFilters(eventTypeEntry.getKey(), eventTypeEntry.getValue().properties, cxsEventPropertiesFilterInput);
+            addSetFilters(eventTypeEntry.getKey(), eventTypeEntry.getValue().getProperties(), cxsEventPropertiesFilterInput);
         }
     }
 
@@ -127,21 +128,21 @@ public class CXSEventBuilders implements CXSBuilder {
 
         for (CXSPropertyType cxsPropertyType : properties) {
             if (cxsPropertyType instanceof CXSIdentifierPropertyType) {
-                addIdentityFilters(cxsPropertyType.name, eventTypeFilterInput);
+                addIdentityFilters(cxsPropertyType.getName(), eventTypeFilterInput);
             } else if (cxsPropertyType instanceof CXSStringPropertyType) {
-                addStringFilters(cxsPropertyType.name, eventTypeFilterInput);
+                addStringFilters(cxsPropertyType.getName(), eventTypeFilterInput);
             } else if (cxsPropertyType instanceof CXSBooleanPropertyType) {
-                addBooleanFilters(cxsPropertyType.name, eventTypeFilterInput);
+                addBooleanFilters(cxsPropertyType.getName(), eventTypeFilterInput);
             } else if (cxsPropertyType instanceof CXSIntPropertyType) {
-                addIntegerFilters(cxsPropertyType.name, eventTypeFilterInput);
+                addIntegerFilters(cxsPropertyType.getName(), eventTypeFilterInput);
             } else if (cxsPropertyType instanceof CXSFloatPropertyType) {
-                addFloatFilters(cxsPropertyType.name, eventTypeFilterInput);
+                addFloatFilters(cxsPropertyType.getName(), eventTypeFilterInput);
             } else if (cxsPropertyType instanceof CXSGeoPointPropertyType) {
-                addDistanceFilters(cxsPropertyType.name, eventTypeFilterInput);
+                addDistanceFilters(cxsPropertyType.getName(), eventTypeFilterInput);
             } else if (cxsPropertyType instanceof CXSDatePropertyType) {
-                addDateFilters(cxsPropertyType.name, eventTypeFilterInput);
+                addDateFilters(cxsPropertyType.getName(), eventTypeFilterInput);
             } else if (cxsPropertyType instanceof CXSSetPropertyType) {
-                addSetFilters(cxsPropertyType.name, ((CXSSetPropertyType) cxsPropertyType).properties, eventTypeFilterInput);
+                addSetFilters(cxsPropertyType.getName(), ((CXSSetPropertyType) cxsPropertyType).getProperties(), eventTypeFilterInput);
             }
         }
 
@@ -287,7 +288,7 @@ public class CXSEventBuilders implements CXSBuilder {
             CXSEventType cxsEventType = cxsEventTypeEntry.getValue();
             cxsEventInputType.field(newInputObjectField()
                     .name(cxsEventTypeEntry.getKey())
-                    .type(buildCXSEventTypeInputProperty(cxsEventType.typeName, cxsEventType.properties))
+                    .type(buildCXSEventTypeInputProperty(cxsEventType.getTypeName(), cxsEventType.getProperties()))
             );
         }
 
@@ -318,12 +319,12 @@ public class CXSEventBuilders implements CXSBuilder {
             } else if (cxsEventPropertyType instanceof CXSGeoPointPropertyType) {
                 eventPropertyInputType = (GraphQLInputType) typeRegistry.get(CXSGeoPoint.class.getName());
             } else if (cxsEventPropertyType instanceof CXSSetPropertyType) {
-                eventPropertyInputType = buildCXSEventTypeInputProperty(cxsEventPropertyType.name, ((CXSSetPropertyType)cxsEventPropertyType).properties);
+                eventPropertyInputType = buildCXSEventTypeInputProperty(cxsEventPropertyType.getName(), ((CXSSetPropertyType)cxsEventPropertyType).getProperties());
             }
             eventInputType
                     .field(newInputObjectField()
                             .type(eventPropertyInputType)
-                            .name(cxsEventPropertyType.name)
+                            .name(cxsEventPropertyType.getName())
                     );
         }
 
@@ -428,7 +429,7 @@ public class CXSEventBuilders implements CXSBuilder {
             CXSEventType cxsEventType = cxsEventTypeEntry.getValue();
             eventPropertiesOutputType
                     .field(newFieldDefinition()
-                            .type(buildEventOutputType(cxsEventType.typeName, cxsEventType.properties))
+                            .type(buildEventOutputType(cxsEventType.getTypeName(), cxsEventType.getProperties()))
                             .name(cxsEventTypeEntry.getKey())
                     );
         }
@@ -459,12 +460,12 @@ public class CXSEventBuilders implements CXSBuilder {
             } else if (cxsEventPropertyType instanceof CXSGeoPointPropertyType) {
                 eventPropertyOutputType = (GraphQLOutputType) typeRegistry.get(CXSGeoPoint.class.getName());
             } else if (cxsEventPropertyType instanceof CXSSetPropertyType) {
-                eventPropertyOutputType = buildEventOutputType(cxsEventPropertyType.name, ((CXSSetPropertyType)cxsEventPropertyType).properties);
+                eventPropertyOutputType = buildEventOutputType(cxsEventPropertyType.getName(), ((CXSSetPropertyType)cxsEventPropertyType).getProperties());
             }
             eventOutputType
                     .field(newFieldDefinition()
                             .type(eventPropertyOutputType)
-                            .name(cxsEventPropertyType.name)
+                            .name(cxsEventPropertyType.getName())
                     );
         }
 
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 a3c299d..949f51e 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
@@ -24,6 +24,7 @@ import graphql.servlet.GraphQLQueryProvider;
 import graphql.servlet.GraphQLTypesProvider;
 import org.apache.unomi.graphql.*;
 import org.apache.unomi.graphql.builders.CXSEventBuilders;
+import org.apache.unomi.graphql.propertytypes.CXSSetPropertyType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -113,12 +114,13 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                 .type(getOutputTypeFromRegistry("CXS_Query"))
                 .name("cxs")
                 .description("Root field for all CXS queries")
+                /*
                 .dataFetcher(new DataFetcher() {
                     public Object get(DataFetchingEnvironment environment) {
                         Map<String,Object> map = environment.getContext();
                         return map.keySet();
                     }
-                }).build());
+                })*/.build());
         return fieldDefinitions;
     }
 
@@ -130,15 +132,15 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
     @Override
     public Collection<GraphQLFieldDefinition> getMutations() {
         List<GraphQLFieldDefinition> fieldDefinitions = new ArrayList<GraphQLFieldDefinition>();
+        final CXSGraphQLProvider cxsGraphQLProvider = this;
         fieldDefinitions.add(newFieldDefinition()
                 .type(getOutputTypeFromRegistry("CXS_Mutation"))
                 .name("cxs")
                 .description("Root field for all CXS mutations")
-                .dataFetcher(new DataFetcher<Object>() {
+                .dataFetcher(new DataFetcher<CXSGraphQLProvider>() {
                     @Override
-                    public Object get(DataFetchingEnvironment environment) {
-                        Object contextObject = environment.getContext();
-                        return contextObject;
+                    public CXSGraphQLProvider get(DataFetchingEnvironment environment) {
+                        return cxsGraphQLProvider;
                     }
                 }).build());
         return fieldDefinitions;
@@ -238,119 +240,4 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                 .build();
     }
 
-    private GraphQLOutputType buildCXSMutationOutputType() {
-        return newObject()
-                .name("CXS_Mutation")
-                .description("Root CXS mutation type")
-                .field(newFieldDefinition()
-                        .type(getOutputTypeFromRegistry(CXSEventType.class.getName()))
-                        .name("createOrUpdateEventType")
-                        .argument(newArgument()
-                                .name("eventType")
-                                .type(getInputTypeFromRegistry(CXSEventTypeInput.class.getName()))
-                        )
-                        .description("Create or updates a CXS event type in the Apache Unomi server")
-                        .dataFetcher(new DataFetcher<CXSEventType>() {
-                            @Override
-                            public CXSEventType get(DataFetchingEnvironment environment) {
-                                Map<String,Object> arguments = environment.getArguments();
-                                CXSEventType cxsEventType = new CXSEventType();
-                                if (arguments.containsKey("eventType")) {
-                                    Map<String,Object> eventTypeArguments = (Map<String,Object>) arguments.get("eventType");
-                                    if (eventTypeArguments.containsKey("typeName")) {
-                                        cxsEventType.id = (String) eventTypeArguments.get("typeName");
-                                        cxsEventType.typeName = (String) eventTypeArguments.get("typeName");
-                                    }
-                                    cxsEventType.properties = new ArrayList<>();
-                                    if (eventTypeArguments.containsKey("properties")) {
-                                        List<Map<String, Object>> properties = (List<Map<String, Object>>) eventTypeArguments.get("properties");
-                                        for (Map<String, Object> propertyTypeMap : properties) {
-                                            CXSPropertyType cxsPropertyType = getPropertyType(propertyTypeMap);
-                                            if (cxsPropertyType != null) {
-                                                cxsEventType.properties.add(cxsPropertyType);
-                                            }
-                                        }
-                                    }
-                                }
-                                eventTypes.put(cxsEventType.typeName, cxsEventType);
-                                updateGraphQLTypes();
-                                if (cxsProviderManager != null) {
-                                    cxsProviderManager.refreshProviders();
-                                }
-                                return cxsEventType;
-                            }
-                        })
-                )
-                .field(newFieldDefinition()
-                        .name("processEvents")
-                        .description("Processes events sent to the Context Server")
-                        .argument(newArgument()
-                                .name("events")
-                                .type(new GraphQLList(getInputTypeFromRegistry("CXS_EventInput"))))
-                        .type(GraphQLInt)
-                )
-                .build();
-    }
-
-    private CXSPropertyType getPropertyType(Map<String, Object> propertyTypeMap) {
-        if (propertyTypeMap.size() > 1) {
-            logger.error("Only one property type is allowed for each property !");
-            return null;
-        }
-        CXSPropertyType propertyType = null;
-        if (propertyTypeMap.containsKey("identifier")) {
-            propertyType = getIdentifierPropertyType(propertyTypeMap);
-        } else if (propertyTypeMap.containsKey("string")) {
-            propertyType = getStringPropertyType(propertyTypeMap);
-        } else if (propertyTypeMap.containsKey("set")) {
-            propertyType = getSetPropertyType(propertyTypeMap);
-        }
-        return propertyType;
-    }
-
-    private CXSPropertyType getSetPropertyType(Map<String, Object> propertyTypeMap) {
-        CXSSetPropertyType cxsSetPropertyType = new CXSSetPropertyType();
-        Map<String,Object> setPropertyTypeMap = (Map<String,Object>) propertyTypeMap.get("set");
-        populateCommonProperties(setPropertyTypeMap, cxsSetPropertyType);
-        if (setPropertyTypeMap.containsKey("properties")) {
-            List<Map<String,Object>> propertyList = (List<Map<String,Object>>) setPropertyTypeMap.get("properties");
-            List<CXSPropertyType> setProperties = new ArrayList<>();
-            for (Map<String,Object> setProperty : propertyList) {
-                CXSPropertyType subPropertyType = getPropertyType(setProperty);
-                if (subPropertyType != null) {
-                    setProperties.add(subPropertyType);
-                }
-            }
-            cxsSetPropertyType.properties = setProperties;
-        }
-        return cxsSetPropertyType;
-    }
-
-    private CXSPropertyType getStringPropertyType(Map<String, Object> propertyTypeMap) {
-        CXSStringPropertyType cxsStringPropertyType = new CXSStringPropertyType();
-        Map<String,Object> stringPropertyTypeMap = (Map<String,Object>) propertyTypeMap.get("string");
-        populateCommonProperties(stringPropertyTypeMap, cxsStringPropertyType);
-        return cxsStringPropertyType;
-    }
-
-    private CXSPropertyType getIdentifierPropertyType(Map<String, Object> propertyTypeMap) {
-        CXSIdentifierPropertyType cxsIdentifierPropertyType = new CXSIdentifierPropertyType();
-        Map<String,Object> identifierPropertyTypeMap = (Map<String,Object>) propertyTypeMap.get("identifier");
-        populateCommonProperties(identifierPropertyTypeMap, cxsIdentifierPropertyType);
-        return cxsIdentifierPropertyType;
-    }
-
-    private void populateCommonProperties(Map<String, Object> propertyTypeMap, CXSPropertyType cxsPropertyType) {
-        if (propertyTypeMap == null || propertyTypeMap.size() == 0) {
-            return;
-        }
-        if (propertyTypeMap.containsKey("id")) {
-            cxsPropertyType.id = (String) propertyTypeMap.get("id");
-        }
-        if (propertyTypeMap.containsKey("name")) {
-            cxsPropertyType.name = (String) propertyTypeMap.get("name");
-        }
-    }
-
-
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
index bb00d54..99d9d1f 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
@@ -17,7 +17,6 @@
 package org.apache.unomi.graphql.internal;
 
 import graphql.annotations.processor.GraphQLAnnotationsComponent;
-import graphql.annotations.processor.ProcessingElementsContainer;
 import graphql.servlet.GraphQLMutationProvider;
 import graphql.servlet.GraphQLQueryProvider;
 import graphql.servlet.GraphQLTypesProvider;
@@ -41,7 +40,6 @@ public class CXSProviderManagerImpl implements CXSProviderManager {
 
     private CXSGraphQLProvider cxsGraphQLProvider;
     private GraphQLAnnotationsComponent annotationsComponent;
-    private ProcessingElementsContainer container;
     private ServiceRegistration<?> providerSR;
     private BundleContext bundleContext;
 
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSBooleanPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSBooleanPropertyType.java
new file mode 100644
index 0000000..75bc309
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSBooleanPropertyType.java
@@ -0,0 +1,51 @@
+/*
+ * 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("CXSBooleanPropertyType")
+public class CXSBooleanPropertyType extends CXSPropertyType {
+
+    private Boolean defaultValue;
+
+    public CXSBooleanPropertyType(@GraphQLName("id") String id,
+                                  @GraphQLName("name") String name,
+                                  @GraphQLName("minOccurrences") Integer minOccurrences,
+                                  @GraphQLName("maxOccurrences") Integer maxOccurrences,
+                                  @GraphQLName("tags") List<String> tags,
+                                  @GraphQLName("systemTags") List<String> systemTags,
+                                  @GraphQLName("personalData") Boolean personalData,
+                                  @GraphQLName("defaultValue") Boolean defaultValue) {
+        super(id, name, minOccurrences, maxOccurrences, tags, systemTags, personalData);
+        this.defaultValue = defaultValue;
+    }
+
+    public CXSBooleanPropertyType(CXSPropertyType input, Boolean defaultValue) {
+        super(input);
+        this.defaultValue = defaultValue;
+    }
+
+    @GraphQLField
+    @GraphQLName("defaultValue")
+    public Boolean isDefaultValue() {
+        return defaultValue;
+    }
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSDatePropertyType.java
similarity index 50%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSDatePropertyType.java
index a7c1c2c..4b4b403 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSDatePropertyType.java
@@ -14,26 +14,31 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.propertytypes;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
 import java.util.List;
 
-@GraphQLName("CXS_EventType")
-public class CXSEventType {
+public class CXSDatePropertyType extends CXSPropertyType {
 
-    @GraphQLField
-    public String id;
+    private String defaultValue;
 
-    @GraphQLField
-    public String scope;
+    public CXSDatePropertyType(@GraphQLName("id") String id,
+                               @GraphQLName("name") String name,
+                               @GraphQLName("minOccurrences") Integer minOccurrences,
+                               @GraphQLName("maxOccurrences") Integer maxOccurrences,
+                               @GraphQLName("tags") List<String> tags,
+                               @GraphQLName("systemTags") List<String> systemTags,
+                               @GraphQLName("personalData") Boolean personalData,
+                               @GraphQLName("defaultValue") String defaultValue) {
+        super(id, name, minOccurrences, maxOccurrences, tags, systemTags, personalData);
+        this.defaultValue = defaultValue;
+    }
 
     @GraphQLField
-    public String typeName;
-
-    @GraphQLField
-    public List<CXSPropertyType> properties;
-
+    public String getDefaultValue() {
+        return defaultValue;
+    }
 }
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
new file mode 100644
index 0000000..6a37058
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSFloatPropertyType.java
@@ -0,0 +1,60 @@
+/*
+ * 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;
+
+public class CXSFloatPropertyType extends CXSPropertyType {
+
+    private Float minValue;
+    private Float maxValue;
+    private Float defaultValue;
+
+    public CXSFloatPropertyType(@GraphQLName("id") String id,
+                                @GraphQLName("name") String name,
+                                @GraphQLName("minOccurrences") Integer minOccurrences,
+                                @GraphQLName("maxOccurrences") Integer maxOccurrences,
+                                @GraphQLName("tags") List<String> tags,
+                                @GraphQLName("systemTags") List<String> systemTags,
+                                @GraphQLName("personalData") Boolean personalData,
+                                @GraphQLName("minValue") Float minValue,
+                                @GraphQLName("maxValue") Float maxValue,
+                                @GraphQLName("defaultValue") Float defaultValue) {
+        super(id, name, minOccurrences, maxOccurrences, tags, systemTags, personalData);
+        this.minValue = minValue;
+        this.maxValue = maxValue;
+        this.defaultValue = defaultValue;
+    }
+
+    @GraphQLField
+    public Float getMinValue() {
+        return minValue;
+    }
+
+    @GraphQLField
+    public Float getMaxValue() {
+        return maxValue;
+    }
+
+    @GraphQLField
+    public Float getDefaultValue() {
+        return defaultValue;
+    }
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSGeoPointPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSGeoPointPropertyType.java
new file mode 100644
index 0000000..94f2d97
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSGeoPointPropertyType.java
@@ -0,0 +1,44 @@
+/*
+ * 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;
+
+public class CXSGeoPointPropertyType extends CXSPropertyType {
+
+    private String defaultValue;
+
+    public CXSGeoPointPropertyType(@GraphQLName("id") String id,
+                                   @GraphQLName("name") String name,
+                                   @GraphQLName("minOccurrences") Integer minOccurrences,
+                                   @GraphQLName("maxOccurrences") Integer maxOccurrences,
+                                   @GraphQLName("tags") List<String> tags,
+                                   @GraphQLName("systemTags") List<String> 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;
+    }
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIdentifierPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIdentifierPropertyType.java
new file mode 100644
index 0000000..7207740
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIdentifierPropertyType.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.propertytypes;
+
+import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
+
+import java.util.List;
+
+public class CXSIdentifierPropertyType extends CXSPropertyType {
+
+    private String regexp;
+    private String defaultValue;
+
+    public CXSIdentifierPropertyType(@GraphQLName("id") String id,
+                                     @GraphQLName("name") String name,
+                                     @GraphQLName("minOccurrences") Integer minOccurrences,
+                                     @GraphQLName("maxOccurrences") Integer maxOccurrences,
+                                     @GraphQLName("tags") List<String> tags,
+                                     @GraphQLName("systemTags") List<String> systemTags,
+                                     @GraphQLName("personalData") Boolean personalData,
+                                     @GraphQLName("regexp") String regexp,
+                                     @GraphQLName("defaultValue") String defaultValue) {
+        super(id, name, minOccurrences, maxOccurrences, tags, systemTags, personalData);
+        this.regexp = regexp;
+        this.defaultValue = defaultValue;
+    }
+
+    @GraphQLField
+    public String getRegexp() {
+        return regexp;
+    }
+
+    @GraphQLField
+    public String getDefaultValue() {
+        return defaultValue;
+    }
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIntPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIntPropertyType.java
new file mode 100644
index 0000000..96c3322
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSIntPropertyType.java
@@ -0,0 +1,60 @@
+/*
+ * 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;
+
+public class CXSIntPropertyType extends CXSPropertyType {
+
+    private Integer minValue;
+    private Integer maxValue;
+    private Integer defaultValue;
+
+    public CXSIntPropertyType(@GraphQLName("id") String id,
+                              @GraphQLName("name") String name,
+                              @GraphQLName("minOccurrences") Integer minOccurrences,
+                              @GraphQLName("maxOccurrences") Integer maxOccurrences,
+                              @GraphQLName("tags") List<String> tags,
+                              @GraphQLName("systemTags") List<String> systemTags,
+                              @GraphQLName("personalData") Boolean personalData,
+                              @GraphQLName("minValue") Integer minValue,
+                              @GraphQLName("maxValue") Integer maxValue,
+                              @GraphQLName("defaultValue") Integer defaultValue) {
+        super(id, name, minOccurrences, maxOccurrences, tags, systemTags, personalData);
+        this.minValue = minValue;
+        this.maxValue = maxValue;
+        this.defaultValue = defaultValue;
+    }
+
+    @GraphQLField
+    public Integer getMinValue() {
+        return minValue;
+    }
+
+    @GraphQLField
+    public Integer getMaxValue() {
+        return maxValue;
+    }
+
+    @GraphQLField
+    public Integer getDefaultValue() {
+        return defaultValue;
+    }
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSPropertyType.java
new file mode 100644
index 0000000..28aaf7e
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSPropertyType.java
@@ -0,0 +1,94 @@
+/*
+ * 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;
+
+public class CXSPropertyType {
+
+    private String id;
+    private String name;
+    private Integer minOccurrences;
+    private Integer maxOccurrences;
+    private List<String> tags;
+    private List<String> systemTags;
+    private Boolean personalData;
+
+    public CXSPropertyType(@GraphQLName("id") String id,
+                           @GraphQLName("name") String name,
+                           @GraphQLName("minOccurrences") Integer minOccurrences,
+                           @GraphQLName("maxOccurrences") Integer maxOccurrences,
+                           @GraphQLName("tags") List<String> tags,
+                           @GraphQLName("systemTags") List<String> systemTags,
+                           @GraphQLName("personalData") Boolean personalData) {
+        this.id = id;
+        this.name = name;
+        this.minOccurrences = minOccurrences;
+        this.maxOccurrences = maxOccurrences;
+        this.tags = tags;
+        this.systemTags = systemTags;
+        this.personalData = personalData;
+    }
+
+    public CXSPropertyType(CXSPropertyType input) {
+        this.id = input.id;
+        this.name = input.name;
+        this.minOccurrences = input.minOccurrences;
+        this.maxOccurrences = input.maxOccurrences;
+        this.tags = input.tags;
+        this.systemTags = input.systemTags;
+        this.personalData = input.personalData;
+    }
+
+    @GraphQLField
+    public String getId() {
+        return id;
+    }
+
+    @GraphQLField
+    public String getName() {
+        return name;
+    }
+
+    @GraphQLField
+    public Integer getMinOccurrences() {
+        return minOccurrences;
+    }
+
+    @GraphQLField
+    public Integer getMaxOccurrences() {
+        return maxOccurrences;
+    }
+
+    @GraphQLField
+    public List<String> getTags() {
+        return tags;
+    }
+
+    @GraphQLField
+    public List<String> getSystemTags() {
+        return systemTags;
+    }
+
+    @GraphQLField
+    public Boolean isPersonalData() {
+        return personalData;
+    }
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSSetPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSSetPropertyType.java
new file mode 100644
index 0000000..25e796c
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSSetPropertyType.java
@@ -0,0 +1,44 @@
+/*
+ * 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;
+
+public class CXSSetPropertyType extends CXSPropertyType {
+
+    private List<CXSPropertyType> properties;
+
+    public CXSSetPropertyType(@GraphQLName("id") String id,
+                              @GraphQLName("name") String name,
+                              @GraphQLName("minOccurrences") Integer minOccurrences,
+                              @GraphQLName("maxOccurrences") Integer maxOccurrences,
+                              @GraphQLName("tags") List<String> tags,
+                              @GraphQLName("systemTags") List<String> systemTags,
+                              @GraphQLName("personalData") Boolean personalData,
+                              @GraphQLName("properties") List<CXSPropertyType> properties) {
+        super(id, name, minOccurrences, maxOccurrences, tags, systemTags, personalData);
+        this.properties = properties;
+    }
+
+    @GraphQLField
+    public List<CXSPropertyType> getProperties() {
+        return properties;
+    }
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSStringPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSStringPropertyType.java
new file mode 100644
index 0000000..7736d09
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/propertytypes/CXSStringPropertyType.java
@@ -0,0 +1,53 @@
+/*
+ * 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;
+
+public class CXSStringPropertyType extends CXSPropertyType {
+
+    private String regexp;
+    private String defaultValue;
+
+    public CXSStringPropertyType(@GraphQLName("id") String id,
+                                 @GraphQLName("name") String name,
+                                 @GraphQLName("minOccurrences") Integer minOccurrences,
+                                 @GraphQLName("maxOccurrences") Integer maxOccurrences,
+                                 @GraphQLName("tags") List<String> tags,
+                                 @GraphQLName("systemTags") List<String> systemTags,
+                                 @GraphQLName("personalData") Boolean personalData,
+                                 @GraphQLName("regexp") String regexp,
+                                 @GraphQLName("defaultValue") String defaultValue) {
+        super(id, name, minOccurrences, maxOccurrences, tags, systemTags, personalData);
+        this.regexp = regexp;
+        this.defaultValue = defaultValue;
+    }
+
+    @GraphQLField
+    public String getRegexp() {
+        return regexp;
+    }
+
+    @GraphQLField
+    public String getDefaultValue() {
+        return defaultValue;
+    }
+
+}


[unomi] 07/15: 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.

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit 165b532cf2963b7437daf6ba0ef47b85802aa59e
Author: Serge Huber <sh...@apache.org>
AuthorDate: Fri Jul 13 15:22:34 2018 +0200

    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 <sh...@apache.org>
---
 graphql/cxs-impl/pom.xml                           |   2 +
 .../java/org/apache/unomi/graphql/CXSEvent.java    |  14 +-
 ...raphQLProvider.java => CXSEventConnection.java} |  11 +-
 .../{CXSGraphQLProvider.java => CXSEventEdge.java} |   9 +-
 ...CXSGraphQLProvider.java => CXSEventFilter.java} |  11 +-
 ...aphQLProvider.java => CXSEventFilterInput.java} |  15 +-
 .../graphql/{CXSEvent.java => CXSEventInput.java}  |  16 +-
 ...Provider.java => CXSEventOccurrenceFilter.java} |  15 +-
 ...raphQLProvider.java => CXSEventProperties.java} |  14 +-
 ...Provider.java => CXSEventPropertiesFilter.java} |   5 +-
 .../apache/unomi/graphql/CXSGraphQLProvider.java   |   5 +
 .../java/org/apache/unomi/graphql/CXSMutation.java | 113 +++++
 ...ovider.java => CXSProfilePropertiesFilter.java} |  15 +-
 .../apache/unomi/graphql/CXSPropertyTypeInput.java |   2 +-
 .../{CXSPropertyTypeInput.java => CXSQuery.java}   |  46 +-
 .../{CXSGraphQLProvider.java => CXSSegment.java}   |  15 +-
 ...aphQLProvider.java => CXSSegmentCondition.java} |  13 +-
 .../{CXSGraphQLProvider.java => CXSView.java}      |   7 +-
 .../CXSBuilder.java}                               |   6 +-
 .../CXSEventBuilders.java}                         | 347 ++------------
 .../graphql/internal/CXSGraphQLProviderImpl.java   | 498 +++------------------
 graphql/karaf-feature/pom.xml                      |   2 +
 graphql/pom.xml                                    |   2 +-
 23 files changed, 368 insertions(+), 815 deletions(-)

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 @@
     <modelVersion>4.0.0</modelVersion>
 
     <artifactId>cxs-graphql-api-impl</artifactId>
+    <name>Apache Unomi :: GraphQL API :: CXS Implementation</name>
+    <description>Apache Unomi Context GraphQL API CXS Implementation</description>
     <packaging>bundle</packaging>
 
     <dependencies>
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<Object,Object> 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<Object, Object> getProperties() {
+    @GraphQLField
+    public CXSEventProperties getProperties() {
         return properties;
     }
 
+    @GraphQLField
     public CXSGeoPoint getLocation() {
         return location;
     }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventConnection.java
similarity index 79%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventConnection.java
index ae444b9..04c208c 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventConnection.java
@@ -16,8 +16,15 @@
  */
 package org.apache.unomi.graphql;
 
-public interface CXSGraphQLProvider {
+import graphql.annotations.annotationTypes.GraphQLField;
 
-    void setCxsProviderManager(CXSProviderManager cxsProviderManager);
+import java.util.List;
+
+public class CXSEventConnection {
+
+    @GraphQLField
+    public List<CXSEventEdge> edges;
+    @GraphQLField
+    public PageInfo pageInfo;
 
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventEdge.java
similarity index 82%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventEdge.java
index ae444b9..e58d422 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventEdge.java
@@ -16,8 +16,13 @@
  */
 package org.apache.unomi.graphql;
 
-public interface CXSGraphQLProvider {
+import graphql.annotations.annotationTypes.GraphQLField;
 
-    void setCxsProviderManager(CXSProviderManager cxsProviderManager);
+public class CXSEventEdge {
+
+    @GraphQLField
+    public CXSEvent node;
+    @GraphQLField
+    public String cursor;
 
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilter.java
similarity index 78%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilter.java
index ae444b9..9e4ebe8 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilter.java
@@ -16,8 +16,15 @@
  */
 package org.apache.unomi.graphql;
 
-public interface CXSGraphQLProvider {
+import graphql.annotations.annotationTypes.GraphQLField;
 
-    void setCxsProviderManager(CXSProviderManager cxsProviderManager);
+import java.util.List;
+
+public class CXSEventFilter {
+
+    @GraphQLField
+    public List<CXSEventFilter> andFilters;
+    @GraphQLField
+    public List<CXSEventFilter> orFilters;
 
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilterInput.java
similarity index 70%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilterInput.java
index ae444b9..1e46e60 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventFilterInput.java
@@ -16,8 +16,19 @@
  */
 package org.apache.unomi.graphql;
 
-public interface CXSGraphQLProvider {
+import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
-    void setCxsProviderManager(CXSProviderManager cxsProviderManager);
+import java.util.List;
+
+public class CXSEventFilterInput {
+
+    @GraphQLField
+    @GraphQLName("and")
+    public List<CXSEventFilterInput> andFilters;
+
+    @GraphQLField
+    @GraphQLName("or")
+    public List<CXSEventFilterInput> orFilters;
 
 }
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/CXSEventInput.java
similarity index 84%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventInput.java
index c278678..9b7b752 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/CXSEventInput.java
@@ -16,35 +16,41 @@
  */
 package org.apache.unomi.graphql;
 
+import graphql.annotations.annotationTypes.GraphQLField;
+
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-public class CXSEvent {
-
+public class CXSEventInput {
     private String id;
     private String eventType;
     private long timeStamp;
     private String subject;
     private String object;
     private Map<Object,Object> properties = new LinkedHashMap<>();
-    private CXSGeoPoint location;
+    private CXSGeoPointInput 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;
     }
@@ -53,7 +59,9 @@ public class CXSEvent {
         return properties;
     }
 
-    public CXSGeoPoint getLocation() {
+    @GraphQLField
+    public CXSGeoPointInput getLocation() {
         return location;
     }
+
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilter.java
similarity index 69%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilter.java
index ae444b9..a80fb0f 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilter.java
@@ -16,8 +16,19 @@
  */
 package org.apache.unomi.graphql;
 
-public interface CXSGraphQLProvider {
+import graphql.annotations.annotationTypes.GraphQLField;
 
-    void setCxsProviderManager(CXSProviderManager cxsProviderManager);
+public class CXSEventOccurrenceFilter {
+    @GraphQLField
+    public String eventType;
+    @GraphQLField
+    public String beforeTime;
+    @GraphQLField
+    public String afterTime;
+    @GraphQLField
+    public String betweenTime;
+    @GraphQLField
+    public int count;
 
+    public CXSEventFilter eventFilter;
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventProperties.java
similarity index 71%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventProperties.java
index ae444b9..7b072b9 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventProperties.java
@@ -16,8 +16,18 @@
  */
 package org.apache.unomi.graphql;
 
-public interface CXSGraphQLProvider {
+import graphql.annotations.annotationTypes.GraphQLField;
 
-    void setCxsProviderManager(CXSProviderManager cxsProviderManager);
+import java.util.LinkedHashMap;
+import java.util.Map;
 
+public class CXSEventProperties {
+    @GraphQLField
+    public int nbProperties;
+
+    Map<Object,Object> properties = new LinkedHashMap<>();
+
+    public Map<Object, Object> getProperties() {
+        return properties;
+    }
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventPropertiesFilter.java
similarity index 88%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventPropertiesFilter.java
index ae444b9..c24664f 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventPropertiesFilter.java
@@ -16,8 +16,5 @@
  */
 package org.apache.unomi.graphql;
 
-public interface CXSGraphQLProvider {
-
-    void setCxsProviderManager(CXSProviderManager cxsProviderManager);
-
+public class CXSEventPropertiesFilter {
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
index ae444b9..1636402 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
@@ -16,8 +16,13 @@
  */
 package org.apache.unomi.graphql;
 
+import java.util.Map;
+
 public interface CXSGraphQLProvider {
 
+    Map<String,CXSEventType> getEventTypes();
+    CXSProviderManager getCxsProviderManager();
+    void updateGraphQLTypes();
     void setCxsProviderManager(CXSProviderManager cxsProviderManager);
 
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java
new file mode 100644
index 0000000..e3a4dce
--- /dev/null
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSMutation.java
@@ -0,0 +1,113 @@
+/*
+ * 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;
+import graphql.schema.DataFetchingEnvironment;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@GraphQLName("CXS_Mutation")
+public class CXSMutation {
+
+    @GraphQLField
+    public CXSEventType createOrUpdateEventType(DataFetchingEnvironment env, @GraphQLName("eventType") CXSEventTypeInput cxsEventTypeInput) {
+
+        CXSGraphQLProvider cxsGraphQLProvider = null;
+        CXSEventType cxsEventType = new CXSEventType();
+        cxsEventType.id = cxsEventTypeInput.id;
+        cxsEventType.typeName = cxsEventTypeInput.scope;
+        cxsEventType.properties = new ArrayList<>();
+        for (CXSPropertyTypeInput propertyTypeInput : cxsEventTypeInput.properties) {
+            CXSPropertyType propertyType = getPropertyType(propertyTypeInput);
+            cxsEventType.properties.add(propertyType);
+        }
+        cxsGraphQLProvider.getEventTypes().put(cxsEventType.typeName, cxsEventType);
+        cxsGraphQLProvider.updateGraphQLTypes();
+        if (cxsGraphQLProvider.getCxsProviderManager() != null) {
+            cxsGraphQLProvider.getCxsProviderManager().refreshProviders();
+        }
+        return cxsEventType;
+
+    }
+
+    @GraphQLField
+    public int processEvents(DataFetchingEnvironment env, @GraphQLName("events") List<CXSEventInput> events) {
+        return 0;
+    }
+
+    private CXSPropertyType getPropertyType(CXSPropertyTypeInput cxsPropertyTypeInput) {
+        CXSPropertyType propertyType = null;
+        if (cxsPropertyTypeInput.identifierPropertyTypeInput != null) {
+            propertyType = getIdentifierPropertyType(cxsPropertyTypeInput.identifierPropertyTypeInput);
+        } else if (cxsPropertyTypeInput.stringPropertyTypeInput != null) {
+            propertyType = getStringPropertyType(cxsPropertyTypeInput.stringPropertyTypeInput);
+        } else if (cxsPropertyTypeInput.setPropertyTypeInput != null) {
+            propertyType = getSetPropertyType(cxsPropertyTypeInput.setPropertyTypeInput);
+        }
+        return propertyType;
+    }
+
+    private CXSPropertyType getSetPropertyType(CXSSetPropertyTypeInput cxsSetPropertyTypeInput) {
+        CXSSetPropertyType cxsSetPropertyType = new CXSSetPropertyType();
+
+        populateCommonProperties(cxsSetPropertyTypeInput, cxsSetPropertyType);
+        if (cxsSetPropertyTypeInput.properties != null) {
+            List<CXSPropertyType> setProperties = new ArrayList<>();
+            for (CXSPropertyTypeInput setProperty : cxsSetPropertyTypeInput.properties) {
+                CXSPropertyType subPropertyType = getPropertyType(setProperty);
+                if (subPropertyType != null) {
+                    setProperties.add(subPropertyType);
+                }
+            }
+            cxsSetPropertyType.properties = setProperties;
+        }
+        return cxsSetPropertyType;
+    }
+
+    private CXSPropertyType getStringPropertyType(CXSStringPropertyType stringPropertyType) {
+        CXSStringPropertyType cxsStringPropertyType = new CXSStringPropertyType();
+        populateCommonProperties(stringPropertyType, cxsStringPropertyType);
+        cxsStringPropertyType.defaultValue = stringPropertyType.defaultValue;
+        cxsStringPropertyType.regexp = stringPropertyType.regexp;
+        return cxsStringPropertyType;
+    }
+
+    private CXSPropertyType getIdentifierPropertyType(CXSIdentifierPropertyType identifierPropertyType) {
+        CXSIdentifierPropertyType cxsIdentifierPropertyType = new CXSIdentifierPropertyType();
+        populateCommonProperties(identifierPropertyType, cxsIdentifierPropertyType);
+        cxsIdentifierPropertyType.defaultValue = identifierPropertyType.defaultValue;
+        cxsIdentifierPropertyType.regexp = identifierPropertyType.regexp;
+        return cxsIdentifierPropertyType;
+    }
+
+    private void populateCommonProperties(CXSPropertyType source, CXSPropertyType destination) {
+        if (source == null) {
+            return;
+        }
+        destination.id = source.id;
+        destination.name = source.name;
+        destination.personalData = source.personalData;
+        destination.systemTags = source.systemTags;
+        destination.tags = source.tags;
+        destination.minOccurrences = source.minOccurrences;
+        destination.maxOccurrences = source.maxOccurrences;
+    }
+
+}
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProfilePropertiesFilter.java
similarity index 69%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProfilePropertiesFilter.java
index ae444b9..c1eae63 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProfilePropertiesFilter.java
@@ -16,8 +16,19 @@
  */
 package org.apache.unomi.graphql;
 
-public interface CXSGraphQLProvider {
+import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
-    void setCxsProviderManager(CXSProviderManager cxsProviderManager);
+import java.util.List;
+
+public class CXSProfilePropertiesFilter {
+
+    @GraphQLField
+    @GraphQLName("and")
+    public List<CXSProfilePropertiesFilter> andFilters;
+
+    @GraphQLField
+    @GraphQLName("or")
+    public List<CXSProfilePropertiesFilter> orFilters;
 
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
index 900cc4a..48eadec 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
@@ -32,7 +32,7 @@ public class CXSPropertyTypeInput {
 
     @GraphQLField
     @GraphQLName("int")
-    public CXSIntPropertyType integer;
+    public CXSIntPropertyType integerPropertyTypeInput;
 
     @GraphQLField
     @GraphQLName("float")
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSQuery.java
similarity index 55%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSQuery.java
index 900cc4a..24d11ff 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSQuery.java
@@ -18,39 +18,35 @@ package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
+import graphql.schema.DataFetchingEnvironment;
 
-@GraphQLName("CXSPropertyTypeInput")
-public class CXSPropertyTypeInput {
+import java.util.ArrayList;
+import java.util.List;
 
-    @GraphQLField
-    @GraphQLName("identifier")
-    public CXSIdentifierPropertyType identifierPropertyTypeInput;
-
-    @GraphQLField
-    @GraphQLName("string")
-    public CXSStringPropertyType stringPropertyTypeInput;
-
-    @GraphQLField
-    @GraphQLName("int")
-    public CXSIntPropertyType integer;
-
-    @GraphQLField
-    @GraphQLName("float")
-    public CXSFloatPropertyType floatPropertyTypeInput;
+@GraphQLName("CXS_Query")
+public class CXSQuery {
 
     @GraphQLField
-    @GraphQLName("date")
-    public CXSDatePropertyType datePropertyTypeInput;
+    public List<CXSEventType> getEventTypes() {
+        return new ArrayList<>();
+    }
 
     @GraphQLField
-    @GraphQLName("boolean")
-    public CXSBooleanPropertyType booleanPropertyTypeInput;
+    public CXSEvent getEvent(@GraphQLName("id") String id) {
+        return new CXSEvent();
+    }
 
     @GraphQLField
-    @GraphQLName("geopoint")
-    public CXSGeoPointPropertyType geoPointPropertyTypeInput;
+    public CXSEventConnection findEvents(@GraphQLName("filter") CXSEventFilterInput filter,
+                                         @GraphQLName("orderBy") CXSOrderByInput orderBy,
+                                         DataFetchingEnvironment env) {
+        env.getArgument("first");
+        env.getArgument("after");
+        return new CXSEventConnection();
+    }
 
     @GraphQLField
-    @GraphQLName("set")
-    public CXSSetPropertyTypeInput setPropertyTypeInput;
+    public CXSSegment getSegment(@GraphQLName("segmentId") String segmentId) {
+        return new CXSSegment();
+    }
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegment.java
similarity index 70%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegment.java
index ae444b9..4d81f90 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegment.java
@@ -16,8 +16,17 @@
  */
 package org.apache.unomi.graphql;
 
-public interface CXSGraphQLProvider {
-
-    void setCxsProviderManager(CXSProviderManager cxsProviderManager);
+import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
+@GraphQLName("CXS_Segment")
+public class CXSSegment {
+    @GraphQLField
+    public String id;
+    @GraphQLField
+    public CXSView view;
+    @GraphQLField
+    public String name;
+    @GraphQLField
+    public CXSSegmentCondition condition;
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegmentCondition.java
similarity index 66%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegmentCondition.java
index ae444b9..37d3311 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSegmentCondition.java
@@ -16,8 +16,17 @@
  */
 package org.apache.unomi.graphql;
 
-public interface CXSGraphQLProvider {
+import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
-    void setCxsProviderManager(CXSProviderManager cxsProviderManager);
+import java.util.List;
 
+@GraphQLName("CXS_SegmentCondition")
+public class CXSSegmentCondition {
+    @GraphQLField
+    public CXSProfilePropertiesFilter profilePropertiesFilter;
+    @GraphQLField
+    public List<String> grantedConsents;
+    @GraphQLField
+    public CXSEventOccurrenceFilter eventOccurrenceFilter;
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSView.java
similarity index 87%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSView.java
index ae444b9..ddc74b6 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSView.java
@@ -16,8 +16,9 @@
  */
 package org.apache.unomi.graphql;
 
-public interface CXSGraphQLProvider {
-
-    void setCxsProviderManager(CXSProviderManager cxsProviderManager);
+import graphql.annotations.annotationTypes.GraphQLField;
 
+public class CXSView {
+    @GraphQLField
+    public String name;
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSBuilder.java
similarity index 84%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSBuilder.java
index ae444b9..83c7a85 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSBuilder.java
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.builders;
 
-public interface CXSGraphQLProvider {
+public interface CXSBuilder {
 
-    void setCxsProviderManager(CXSProviderManager cxsProviderManager);
+    void updateTypes();
 
 }
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/builders/CXSEventBuilders.java
similarity index 53%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSGraphQLProviderImpl.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSEventBuilders.java
index a0596cc..bc1d4f7 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/builders/CXSEventBuilders.java
@@ -14,72 +14,53 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql.internal;
+package org.apache.unomi.graphql.builders;
 
 import graphql.annotations.processor.GraphQLAnnotationsComponent;
 import graphql.annotations.processor.ProcessingElementsContainer;
 import graphql.schema.*;
-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.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
 
 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 {
+public class CXSEventBuilders implements CXSBuilder {
 
-    private static final Logger logger = LoggerFactory.getLogger(CXSGraphQLProviderImpl.class.getName());
-
-    private Map<String,GraphQLOutputType> registeredOutputTypes = new TreeMap<>();
-    private Map<String,GraphQLInputType> registeredInputTypes = new TreeMap<>();
-    private CXSProviderManager cxsProviderManager;
     private GraphQLAnnotationsComponent annotationsComponent;
     private ProcessingElementsContainer container;
+    private Map<String,CXSEventType> eventTypes;
+    private Map<String,GraphQLType> typeRegistry;
 
-    private Map<String,CXSEventType> eventTypes = new TreeMap<>();
-
-    public CXSGraphQLProviderImpl(GraphQLAnnotationsComponent annotationsComponent) {
+    public CXSEventBuilders(GraphQLAnnotationsComponent annotationsComponent,
+                            ProcessingElementsContainer container,
+                            Map<String, CXSEventType> eventTypes) {
         this.annotationsComponent = annotationsComponent;
-        container = annotationsComponent.createContainer();
-        updateGraphQLTypes();
+        this.container = container;
+        this.eventTypes = eventTypes;
+        this.typeRegistry = container.getTypeRegistry();
     }
 
-    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));
+    @Override
+    public void updateTypes() {
+        Map<String,GraphQLType> typeRegistry = container.getTypeRegistry();
+        typeRegistry.put("CXS_EventInput", buildCXSEventInputType());
+        typeRegistry.put(CXSEventOccurrenceFilterInput.class.getName(), annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSEventOccurrenceFilterInput.class, container));
+        typeRegistry.put("CXS_EventPropertiesFilterInput", buildCXSEventPropertiesFilterInput());
+        typeRegistry.put("CXS_EventFilterInput", buildCXSEventFilterInputType());
 
-        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());
+        typeRegistry.put("CXS_EventProperties", buildCXSEventPropertiesOutputType());
 
-        registeredOutputTypes.put("CXS_EventProperties", buildCXSEventPropertiesOutputType());
+        typeRegistry.put("CXS_Event", buildCXSEventOutputType());
+        typeRegistry.put("CXS_EventEdge", buildCXSEventEdgeOutputType());
+        typeRegistry.put("CXS_EventConnection", buildCXSEventConnectionOutputType());
 
-        registeredOutputTypes.put("CXS_Event", buildCXSEventOutputType());
-        registeredOutputTypes.put("CXS_EventEdge", buildCXSEventEdgeOutputType());
-        registeredOutputTypes.put("CXS_EventConnection", buildCXSEventConnectionOutputType());
-        registeredOutputTypes.put("CXS_Query", buildCXSQueryOutputType());
-        registeredOutputTypes.put("CXS_Mutation", buildCXSMutationOutputType());
     }
 
     private GraphQLOutputType buildCXSEventEdgeOutputType() {
@@ -88,7 +69,7 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                 .description("The Relay edge type for the CXS_Event output type")
                 .field(newFieldDefinition()
                         .name("node")
-                        .type(registeredOutputTypes.get("CXS_Event"))
+                        .type((GraphQLOutputType) typeRegistry.get("CXS_Event"))
                 )
                 .field(newFieldDefinition()
                         .name("cursor")
@@ -103,11 +84,11 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                 .description("The Relay connection type for the CXS_Event output type")
                 .field(newFieldDefinition()
                         .name("edges")
-                        .type(new GraphQLList(registeredOutputTypes.get("CXS_EventEdge")))
+                        .type(new GraphQLList(typeRegistry.get("CXS_EventEdge")))
                 )
                 .field(newFieldDefinition()
                         .name("pageInfo")
-                        .type(new GraphQLList(registeredOutputTypes.get(PageInfo.class.getName())))
+                        .type(new GraphQLList(typeRegistry.get(PageInfo.class.getName())))
                 )
                 .build();
     }
@@ -164,11 +145,11 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
             }
         }
 
-        registeredInputTypes.put(eventTypeName + "FilterInput", eventTypeFilterInput.build());
+        typeRegistry.put(eventTypeName + "FilterInput", eventTypeFilterInput.build());
 
         inputTypeBuilder.field(newInputObjectField()
                 .name(eventTypeName)
-                .type(registeredInputTypes.get(eventTypeName + "FilterInput"))
+                .type((GraphQLInputType) typeRegistry.get(eventTypeName + "FilterInput"))
         );
 
     }
@@ -255,14 +236,14 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
     private void addDistanceFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
         inputTypeBuilder.field(newInputObjectField()
                 .name(propertyName + "_distance")
-                .type(registeredInputTypes.get(CXSGeoDistanceInput.class.getName()))
+                .type((GraphQLInputType) typeRegistry.get(CXSGeoDistanceInput.class.getName()))
         );
     }
 
     private void addDateFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
         inputTypeBuilder.field(newInputObjectField()
                 .name(propertyName + "_between")
-                .type(registeredInputTypes.get(CXSDateFilterInput.class.getName()))
+                .type((GraphQLInputType) typeRegistry.get(CXSDateFilterInput.class.getName()))
         );
     }
 
@@ -280,15 +261,15 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                 )
                 .field(newInputObjectField()
                         .name("properties")
-                        .type(registeredInputTypes.get("CXS_EventPropertiesFilterInput"))
+                        .type((GraphQLInputType) typeRegistry.get("CXS_EventPropertiesFilterInput"))
                 )
                 .field(newInputObjectField()
                         .name("properties_or")
-                        .type(registeredInputTypes.get("CXS_EventPropertiesFilterInput"))
+                        .type((GraphQLInputType) typeRegistry.get("CXS_EventPropertiesFilterInput"))
                 )
                 .field(newInputObjectField()
                         .name("eventOccurrence")
-                        .type(registeredInputTypes.get(CXSEventOccurrenceFilterInput.class.getName()))
+                        .type((GraphQLInputType) typeRegistry.get(CXSEventOccurrenceFilterInput.class.getName()))
                 );
         return cxsEventFilterInputType.build();
     }
@@ -335,7 +316,7 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
             } else if (cxsEventPropertyType instanceof CXSDatePropertyType) {
                 eventPropertyInputType = GraphQLString;
             } else if (cxsEventPropertyType instanceof CXSGeoPointPropertyType) {
-                eventPropertyInputType = registeredInputTypes.get(CXSGeoPoint.class.getName());
+                eventPropertyInputType = (GraphQLInputType) typeRegistry.get(CXSGeoPoint.class.getName());
             } else if (cxsEventPropertyType instanceof CXSSetPropertyType) {
                 eventPropertyInputType = buildCXSEventTypeInputProperty(cxsEventPropertyType.name, ((CXSSetPropertyType)cxsEventPropertyType).properties);
             }
@@ -349,256 +330,6 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
         return eventInputType.build();
     }
 
-    @Deactivate
-    void deactivate(
-            ComponentContext cc,
-            BundleContext bc,
-            Map<String,Object> config) {
-
-        registeredOutputTypes.clear();
-    }
-
-    public void setCxsProviderManager(CXSProviderManager cxsProviderManager) {
-        this.cxsProviderManager = cxsProviderManager;
-    }
-
-    @Override
-    public Collection<GraphQLFieldDefinition> getQueries() {
-        List<GraphQLFieldDefinition> fieldDefinitions = new ArrayList<GraphQLFieldDefinition>();
-        fieldDefinitions.add(newFieldDefinition()
-                .type(registeredOutputTypes.get("CXS_Query"))
-                .name("cxs")
-                .description("Root field for all CXS queries")
-                .dataFetcher(new DataFetcher() {
-                    public Object get(DataFetchingEnvironment environment) {
-                        Map<String,Object> map = environment.getContext();
-                        return map.keySet();
-                    }
-                }).build());
-        return fieldDefinitions;
-    }
-
-    @Override
-    public Collection<GraphQLType> getTypes() {
-        return new ArrayList<>();
-    }
-
-    @Override
-    public Collection<GraphQLFieldDefinition> getMutations() {
-        List<GraphQLFieldDefinition> fieldDefinitions = new ArrayList<GraphQLFieldDefinition>();
-        fieldDefinitions.add(newFieldDefinition()
-                .type(registeredOutputTypes.get("CXS_Mutation"))
-                .name("cxs")
-                .description("Root field for all CXS mutation")
-                .dataFetcher(new DataFetcher<Object>() {
-                    @Override
-                    public Object get(DataFetchingEnvironment environment) {
-                        Object contextObject = environment.getContext();
-                        return contextObject;
-                    }
-                }).build());
-        return fieldDefinitions;
-    }
-
-    private GraphQLOutputType buildCXSQueryOutputType() {
-        return newObject()
-                .name("CXS_Query")
-                .description("Root CXS query type")
-                .field(newFieldDefinition()
-                        .type(new GraphQLList(registeredOutputTypes.get(CXSEventType.class.getName())))
-                        .name("getEventTypes")
-                        .description("Retrieves the list of all the declared CXS event types in the Apache Unomi server")
-                )
-                .field(newFieldDefinition()
-                        .type(new GraphQLList(registeredOutputTypes.get("CXS_Event")))
-                        .name("getEvent")
-                        .description("Retrieves a specific event")
-                )
-                .field(newFieldDefinition()
-                        .type(new GraphQLList(registeredOutputTypes.get("CXS_EventConnection")))
-                        .name("findEvents")
-                        .argument(newArgument()
-                                .name("filter")
-                                .type(registeredInputTypes.get("CXS_EventFilterInput"))
-                        )
-                        .argument(newArgument()
-                                .name("orderBy")
-                                .type(registeredInputTypes.get(CXSOrderByInput.class.getName()))
-                        )
-                        .argument(newArgument()
-                                .name("first")
-                                .type(GraphQLInt)
-                                .description("Number of objects to retrieve starting at the after cursor position")
-                        )
-                        .argument(newArgument()
-                                .name("after")
-                                .type(GraphQLString)
-                                .description("Starting cursor location to retrieve the object from")
-                        )
-                        .argument(newArgument()
-                                .name("last")
-                                .type(GraphQLInt)
-                                .description("Number of objects to retrieve end at the before cursor position")
-                        )
-                        .argument(newArgument()
-                                .name("before")
-                                .type(GraphQLString)
-                                .description("End cursor location to retrieve the object from")
-                        )
-                        .description("Retrieves the events that match the specified filters")
-                )
-                /*
-                .field(newFieldDefinition()
-                        .type(new GraphQLList(registeredOutputTypes.get("CXS_ProfileConnection")))
-                        .name("findProfiles")
-                        .argument(newArgument()
-                                .name("filter")
-                                .type(registeredInputTypes.get("CXS_ProfileFilterInput"))
-                        )
-                        .argument(newArgument()
-                                .name("orderBy")
-                                .type(registeredInputTypes.get(CXSOrderByInput.class.getName()))
-                        )
-                        .argument(newArgument()
-                                .name("first")
-                                .type(GraphQLInt)
-                                .description("Number of objects to retrieve starting at the after cursor position")
-                        )
-                        .argument(newArgument()
-                                .name("after")
-                                .type(GraphQLString)
-                                .description("Starting cursor location to retrieve the object from")
-                        )
-                        .argument(newArgument()
-                                .name("last")
-                                .type(GraphQLInt)
-                                .description("Number of objects to retrieve end at the before cursor position")
-                        )
-                        .argument(newArgument()
-                                .name("before")
-                                .type(GraphQLString)
-                                .description("End cursor location to retrieve the object from")
-                        )
-                        .description("Retrieves the profiles that match the specified profiles")
-                )
-                */
-                .build();
-    }
-
-    private GraphQLOutputType buildCXSMutationOutputType() {
-        return newObject()
-                .name("CXS_Mutation")
-                .description("Root CXS mutation type")
-                .field(newFieldDefinition()
-                        .type(registeredOutputTypes.get(CXSEventType.class.getName()))
-                        .name("createOrUpdateEventType")
-                        .argument(newArgument()
-                                .name("eventType")
-                                .type(registeredInputTypes.get(CXSEventTypeInput.class.getName()))
-                        )
-                        .description("Create or updates a CXS event type in the Apache Unomi server")
-                        .dataFetcher(new DataFetcher<CXSEventType>() {
-                            @Override
-                            public CXSEventType get(DataFetchingEnvironment environment) {
-                                Map<String,Object> arguments = environment.getArguments();
-                                CXSEventType cxsEventType = new CXSEventType();
-                                if (arguments.containsKey("eventType")) {
-                                    Map<String,Object> eventTypeArguments = (Map<String,Object>) arguments.get("eventType");
-                                    if (eventTypeArguments.containsKey("typeName")) {
-                                        cxsEventType.id = (String) eventTypeArguments.get("typeName");
-                                        cxsEventType.typeName = (String) eventTypeArguments.get("typeName");
-                                    }
-                                    cxsEventType.properties = new ArrayList<>();
-                                    if (eventTypeArguments.containsKey("properties")) {
-                                        List<Map<String, Object>> properties = (List<Map<String, Object>>) eventTypeArguments.get("properties");
-                                        for (Map<String, Object> propertyTypeMap : properties) {
-                                            CXSPropertyType cxsPropertyType = getPropertyType(propertyTypeMap);
-                                            if (cxsPropertyType != null) {
-                                                cxsEventType.properties.add(cxsPropertyType);
-                                            }
-                                        }
-                                    }
-                                }
-                                eventTypes.put(cxsEventType.typeName, cxsEventType);
-                                updateGraphQLTypes();
-                                if (cxsProviderManager != null) {
-                                    cxsProviderManager.refreshProviders();
-                                }
-                                return cxsEventType;
-                            }
-                        })
-                )
-                .field(newFieldDefinition()
-                        .name("processEvents")
-                        .description("Processes events sent to the Context Server")
-                        .argument(newArgument()
-                                .name("events")
-                                .type(new GraphQLList(registeredInputTypes.get("CXS_EventInput"))))
-                        .type(GraphQLInt)
-                )
-                .build();
-    }
-
-    private CXSPropertyType getPropertyType(Map<String, Object> propertyTypeMap) {
-        if (propertyTypeMap.size() > 1) {
-            logger.error("Only one property type is allowed for each property !");
-            return null;
-        }
-        CXSPropertyType propertyType = null;
-        if (propertyTypeMap.containsKey("identifier")) {
-            propertyType = getIdentifierPropertyType(propertyTypeMap);
-        } else if (propertyTypeMap.containsKey("string")) {
-            propertyType = getStringPropertyType(propertyTypeMap);
-        } else if (propertyTypeMap.containsKey("set")) {
-            propertyType = getSetPropertyType(propertyTypeMap);
-        }
-        return propertyType;
-    }
-
-    private CXSPropertyType getSetPropertyType(Map<String, Object> propertyTypeMap) {
-        CXSSetPropertyType cxsSetPropertyType = new CXSSetPropertyType();
-        Map<String,Object> setPropertyTypeMap = (Map<String,Object>) propertyTypeMap.get("set");
-        populateCommonProperties(setPropertyTypeMap, cxsSetPropertyType);
-        if (setPropertyTypeMap.containsKey("properties")) {
-            List<Map<String,Object>> propertyList = (List<Map<String,Object>>) setPropertyTypeMap.get("properties");
-            List<CXSPropertyType> setProperties = new ArrayList<>();
-            for (Map<String,Object> setProperty : propertyList) {
-                CXSPropertyType subPropertyType = getPropertyType(setProperty);
-                if (subPropertyType != null) {
-                    setProperties.add(subPropertyType);
-                }
-            }
-            cxsSetPropertyType.properties = setProperties;
-        }
-        return cxsSetPropertyType;
-    }
-
-    private CXSPropertyType getStringPropertyType(Map<String, Object> propertyTypeMap) {
-        CXSStringPropertyType cxsStringPropertyType = new CXSStringPropertyType();
-        Map<String,Object> stringPropertyTypeMap = (Map<String,Object>) propertyTypeMap.get("string");
-        populateCommonProperties(stringPropertyTypeMap, cxsStringPropertyType);
-        return cxsStringPropertyType;
-    }
-
-    private CXSPropertyType getIdentifierPropertyType(Map<String, Object> propertyTypeMap) {
-        CXSIdentifierPropertyType cxsIdentifierPropertyType = new CXSIdentifierPropertyType();
-        Map<String,Object> identifierPropertyTypeMap = (Map<String,Object>) propertyTypeMap.get("identifier");
-        populateCommonProperties(identifierPropertyTypeMap, cxsIdentifierPropertyType);
-        return cxsIdentifierPropertyType;
-    }
-
-    private void populateCommonProperties(Map<String, Object> propertyTypeMap, CXSPropertyType cxsPropertyType) {
-        if (propertyTypeMap == null || propertyTypeMap.size() == 0) {
-            return;
-        }
-        if (propertyTypeMap.containsKey("id")) {
-            cxsPropertyType.id = (String) propertyTypeMap.get("id");
-        }
-        if (propertyTypeMap.containsKey("name")) {
-            cxsPropertyType.name = (String) propertyTypeMap.get("name");
-        }
-    }
-
     private GraphQLOutputType buildCXSEventOutputType() {
         return newObject()
                 .name("CXS_Event")
@@ -657,7 +388,7 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                         })
                 )
                 .field(newFieldDefinition()
-                        .type(registeredOutputTypes.get(CXSGeoPoint.class.getName()))
+                        .type((GraphQLOutputType) typeRegistry.get(CXSGeoPoint.class.getName()))
                         .name("location")
                         .description("The geo-point location where the event was fired.")
                         .dataFetcher(new DataFetcher() {
@@ -668,13 +399,13 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                         })
                 )
                 .field(newFieldDefinition()
-                        .type(new GraphQLList(registeredOutputTypes.get("CXS_EventProperties")))
+                        .type(new GraphQLList(typeRegistry.get("CXS_EventProperties")))
                         .name("properties")
                         .description("Generic properties for the event")
                         .dataFetcher(new DataFetcher() {
                             public Object get(DataFetchingEnvironment environment) {
                                 CXSEvent CXSEvent = environment.getSource();
-                                return new ArrayList<Map.Entry<Object,Object>>(CXSEvent.getProperties().entrySet());
+                                return new ArrayList<Map.Entry<Object,Object>>(CXSEvent.getProperties().getProperties().entrySet());
                             }
                         })
                 )
@@ -726,7 +457,7 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
             } else if (cxsEventPropertyType instanceof CXSDatePropertyType) {
                 eventPropertyOutputType = GraphQLString;
             } else if (cxsEventPropertyType instanceof CXSGeoPointPropertyType) {
-                eventPropertyOutputType = registeredOutputTypes.get(CXSGeoPoint.class.getName());
+                eventPropertyOutputType = (GraphQLOutputType) typeRegistry.get(CXSGeoPoint.class.getName());
             } else if (cxsEventPropertyType instanceof CXSSetPropertyType) {
                 eventPropertyOutputType = buildEventOutputType(cxsEventPropertyType.name, ((CXSSetPropertyType)cxsEventPropertyType).properties);
             }
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<String,GraphQLOutputType> registeredOutputTypes = new TreeMap<>();
-    private Map<String,GraphQLInputType> registeredInputTypes = new TreeMap<>();
     private CXSProviderManager cxsProviderManager;
     private GraphQLAnnotationsComponent annotationsComponent;
     private ProcessingElementsContainer container;
+    private CXSEventBuilders cxsEventBuilders;
+    private Map<String,GraphQLType> typeRegistry;
 
     private Map<String,CXSEventType> 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());
-        registeredOutputTypes.put("CXS_Mutation", buildCXSMutationOutputType());
-    }
-
-    private GraphQLOutputType buildCXSEventEdgeOutputType() {
-        return newObject()
-                .name("CXS_EventEdge")
-                .description("The Relay edge type for the CXS_Event output type")
-                .field(newFieldDefinition()
-                        .name("node")
-                        .type(registeredOutputTypes.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(registeredOutputTypes.get("CXS_EventEdge")))
-                )
-                .field(newFieldDefinition()
-                        .name("pageInfo")
-                        .type(new GraphQLList(registeredOutputTypes.get(PageInfo.class.getName())))
-                )
-                .build();
-    }
-
-    private GraphQLInputType buildCXSEventPropertiesFilterInput() {
-        GraphQLInputObjectType.Builder cxsEventPropertiesFilterInput = newInputObject()
-                .name("CXS_EventPropertiesFilterInput")
-                .description("Filter conditions for each event types and built-in properties");
-
-        generateEventPropertiesFilters(cxsEventPropertiesFilterInput);
-        generateEventTypesFilters(cxsEventPropertiesFilterInput);
-
-        return cxsEventPropertiesFilterInput.build();
-    }
-
-
-    private void generateEventPropertiesFilters(GraphQLInputObjectType.Builder cxsEventPropertiesFilterInput) {
-        addIdentityFilters("id", cxsEventPropertiesFilterInput);
-        addIdentityFilters("sourceId", cxsEventPropertiesFilterInput);
-        addIdentityFilters("clientId", cxsEventPropertiesFilterInput);
-        addIdentityFilters("profileId", cxsEventPropertiesFilterInput);
-        addDistanceFilters("location", cxsEventPropertiesFilterInput);
-        addDateFilters("timestamp", cxsEventPropertiesFilterInput);
-    }
-
-    private void generateEventTypesFilters(GraphQLInputObjectType.Builder cxsEventPropertiesFilterInput) {
-        for (Map.Entry<String,CXSEventType> eventTypeEntry : eventTypes.entrySet()) {
-            addSetFilters(eventTypeEntry.getKey(), eventTypeEntry.getValue().properties, cxsEventPropertiesFilterInput);
-        }
+    @Override
+    public Map<String, CXSEventType> getEventTypes() {
+        return eventTypes;
     }
 
-    private void addSetFilters(String eventTypeName, List<CXSPropertyType> properties, GraphQLInputObjectType.Builder inputTypeBuilder) {
-        GraphQLInputObjectType.Builder eventTypeFilterInput = newInputObject()
-                .name(eventTypeName + "FilterInput")
-                .description("Auto-generated filter input type for event type " + eventTypeName);
-
-        for (CXSPropertyType cxsPropertyType : properties) {
-            if (cxsPropertyType instanceof CXSIdentifierPropertyType) {
-                addIdentityFilters(cxsPropertyType.name, eventTypeFilterInput);
-            } else if (cxsPropertyType instanceof CXSStringPropertyType) {
-                addStringFilters(cxsPropertyType.name, eventTypeFilterInput);
-            } else if (cxsPropertyType instanceof CXSBooleanPropertyType) {
-                addBooleanFilters(cxsPropertyType.name, eventTypeFilterInput);
-            } else if (cxsPropertyType instanceof CXSIntPropertyType) {
-                addIntegerFilters(cxsPropertyType.name, eventTypeFilterInput);
-            } else if (cxsPropertyType instanceof CXSFloatPropertyType) {
-                addFloatFilters(cxsPropertyType.name, eventTypeFilterInput);
-            } else if (cxsPropertyType instanceof CXSGeoPointPropertyType) {
-                addDistanceFilters(cxsPropertyType.name, eventTypeFilterInput);
-            } else if (cxsPropertyType instanceof CXSDatePropertyType) {
-                addDateFilters(cxsPropertyType.name, eventTypeFilterInput);
-            } else if (cxsPropertyType instanceof CXSSetPropertyType) {
-                addSetFilters(cxsPropertyType.name, ((CXSSetPropertyType) cxsPropertyType).properties, eventTypeFilterInput);
-            }
-        }
-
-        registeredInputTypes.put(eventTypeName + "FilterInput", eventTypeFilterInput.build());
-
-        inputTypeBuilder.field(newInputObjectField()
-                .name(eventTypeName)
-                .type(registeredInputTypes.get(eventTypeName + "FilterInput"))
-        );
-
+    public CXSProviderManager getCxsProviderManager() {
+        return cxsProviderManager;
     }
 
-    private void addIdentityFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_equals")
-                .type(GraphQLString)
-        );
-    }
+    public void updateGraphQLTypes() {
 
-    private void addStringFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_equals")
-                .type(GraphQLString)
-        );
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_regexp")
-                .type(GraphQLString)
-        );
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_startsWith")
-                .type(GraphQLString)
-        );
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_contains")
-                .type(new GraphQLList(GraphQLString))
-        );
-    }
+        Map<String,GraphQLType> typeRegistry = container.getTypeRegistry();
 
-    private void addBooleanFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_equals")
-                .type(GraphQLBoolean)
-        );
-    }
+        typeRegistry.put(PageInfo.class.getName(), annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(PageInfo.class, container));
 
-    private void addIntegerFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_equals")
-                .type(GraphQLInt)
-        );
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_gt")
-                .type(GraphQLInt)
-        );
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_gte")
-                .type(GraphQLInt)
-        );
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_lt")
-                .type(GraphQLInt)
-        );
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_lte")
-                .type(GraphQLInt)
-        );
-    }
+        typeRegistry.put(CXSGeoPoint.class.getName(), annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSGeoPoint.class, container));
+        typeRegistry.put(CXSSetPropertyType.class.getName(),annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSSetPropertyType.class, container));
+        typeRegistry.put(CXSEventType.class.getName(), annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSEventType.class, container));
 
-    private void addFloatFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_equals")
-                .type(GraphQLFloat)
-        );
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_gt")
-                .type(GraphQLFloat)
-        );
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_gte")
-                .type(GraphQLFloat)
-        );
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_lt")
-                .type(GraphQLFloat)
-        );
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_lte")
-                .type(GraphQLFloat)
-        );
-    }
+        typeRegistry.put(CXSGeoDistanceInput.class.getName(), annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSGeoDistanceInput.class, container));
+        typeRegistry.put(CXSDateFilterInput.class.getName(), annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSDateFilterInput.class, container));
+        typeRegistry.put(CXSEventTypeInput.class.getName(), annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSEventTypeInput.class, container));
+        typeRegistry.put(CXSOrderByInput.class.getName(), annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSOrderByInput.class, container));
 
-    private void addDistanceFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_distance")
-                .type(registeredInputTypes.get(CXSGeoDistanceInput.class.getName()))
-        );
-    }
+        typeRegistry.put("CXS_Query", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSQuery.class, container));
+        typeRegistry.put("CXS_Mutation", annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSMutation.class, container));
+        // typeRegistry.put("CXS_Query", buildCXSQueryOutputType());
+        // typeRegistry.put("CXS_Mutation", buildCXSMutationOutputType());
 
-    private void addDateFilters(String propertyName, GraphQLInputObjectType.Builder inputTypeBuilder) {
-        inputTypeBuilder.field(newInputObjectField()
-                .name(propertyName + "_between")
-                .type(registeredInputTypes.get(CXSDateFilterInput.class.getName()))
-        );
-    }
+        cxsEventBuilders.updateTypes();
 
-    private GraphQLInputType buildCXSEventFilterInputType() {
-        GraphQLInputObjectType.Builder cxsEventFilterInputType = newInputObject()
-                .name("CXS_EventFilterInput")
-                .description("Filter conditions for each event types and built-in properties")
-                .field(newInputObjectField()
-                        .name("and")
-                        .type(new GraphQLList(new GraphQLTypeReference("CXS_EventFilterInput")))
-                )
-                .field(newInputObjectField()
-                        .name("or")
-                        .type(new GraphQLList(new GraphQLTypeReference("CXS_EventFilterInput")))
-                )
-                .field(newInputObjectField()
-                        .name("properties")
-                        .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()))
-                );
-        return cxsEventFilterInputType.build();
     }
 
-    private GraphQLInputType buildCXSEventInputType() {
-        GraphQLInputObjectType.Builder cxsEventInputType = newInputObject()
-                .name("CXS_EventInput")
-                .description("The event input object to send events to the Context Server")
-                .field(newInputObjectField()
-                        .name("id")
-                        .type(GraphQLID)
-                );
-
-        for (Map.Entry<String,CXSEventType> cxsEventTypeEntry : eventTypes.entrySet()) {
-            CXSEventType cxsEventType = cxsEventTypeEntry.getValue();
-            cxsEventInputType.field(newInputObjectField()
-                    .name(cxsEventTypeEntry.getKey())
-                    .type(buildCXSEventTypeInputProperty(cxsEventType.typeName, cxsEventType.properties))
-            );
-        }
-
-        return cxsEventInputType.build();
-
+    private GraphQLObjectType.Builder getBuilderFromAnnotatedClass(Class annotatedClass) {
+        return GraphQLObjectType.newObject()
+                .name(annotatedClass.getName())
+                .fields(((GraphQLObjectType) annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(annotatedClass, container)).getFieldDefinitions());
     }
 
-    private GraphQLInputType buildCXSEventTypeInputProperty(String typeName, List<CXSPropertyType> propertyTypes) {
-        String eventTypeName = typeName.substring(0, 1).toUpperCase() + typeName.substring(1) + "EventTypeInput";
-        GraphQLInputObjectType.Builder eventInputType = newInputObject()
-                .name(eventTypeName)
-                .description("Event type object for event type " + typeName);
-
-        for (CXSPropertyType cxsEventPropertyType : propertyTypes) {
-            GraphQLInputType eventPropertyInputType = null;
-            if (cxsEventPropertyType instanceof CXSIdentifierPropertyType) {
-                eventPropertyInputType = GraphQLID;
-            } else if (cxsEventPropertyType instanceof CXSStringPropertyType) {
-                eventPropertyInputType = GraphQLString;
-            } else if (cxsEventPropertyType instanceof CXSIntPropertyType) {
-                eventPropertyInputType = GraphQLInt;
-            } else if (cxsEventPropertyType instanceof CXSFloatPropertyType) {
-                eventPropertyInputType = GraphQLFloat;
-            } else if (cxsEventPropertyType instanceof CXSBooleanPropertyType) {
-                eventPropertyInputType = GraphQLBoolean;
-            } else if (cxsEventPropertyType instanceof CXSDatePropertyType) {
-                eventPropertyInputType = GraphQLString;
-            } else if (cxsEventPropertyType instanceof CXSGeoPointPropertyType) {
-                eventPropertyInputType = registeredInputTypes.get(CXSGeoPoint.class.getName());
-            } else if (cxsEventPropertyType instanceof CXSSetPropertyType) {
-                eventPropertyInputType = buildCXSEventTypeInputProperty(cxsEventPropertyType.name, ((CXSSetPropertyType)cxsEventPropertyType).properties);
-            }
-            eventInputType
-                    .field(newInputObjectField()
-                            .type(eventPropertyInputType)
-                            .name(cxsEventPropertyType.name)
-                    );
-        }
-
-        return eventInputType.build();
+    private GraphQLOutputType getOutputTypeFromRegistry(String typeName) {
+        return (GraphQLOutputType) typeRegistry.get(typeName);
     }
 
-    @Deactivate
-    void deactivate(
-            ComponentContext cc,
-            BundleContext bc,
-            Map<String,Object> config) {
-
-        registeredOutputTypes.clear();
+    private GraphQLInputObjectType getInputTypeFromRegistry(String typeName) {
+        return (GraphQLInputObjectType) typeRegistry.get(typeName);
     }
 
     public void setCxsProviderManager(CXSProviderManager cxsProviderManager) {
@@ -366,7 +110,7 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
     public Collection<GraphQLFieldDefinition> getQueries() {
         List<GraphQLFieldDefinition> fieldDefinitions = new ArrayList<GraphQLFieldDefinition>();
         fieldDefinitions.add(newFieldDefinition()
-                .type(registeredOutputTypes.get("CXS_Query"))
+                .type(getOutputTypeFromRegistry("CXS_Query"))
                 .name("cxs")
                 .description("Root field for all CXS queries")
                 .dataFetcher(new DataFetcher() {
@@ -387,9 +131,9 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
     public Collection<GraphQLFieldDefinition> getMutations() {
         List<GraphQLFieldDefinition> fieldDefinitions = new ArrayList<GraphQLFieldDefinition>();
         fieldDefinitions.add(newFieldDefinition()
-                .type(registeredOutputTypes.get("CXS_Mutation"))
+                .type(getOutputTypeFromRegistry("CXS_Mutation"))
                 .name("cxs")
-                .description("Root field for all CXS mutation")
+                .description("Root field for all CXS mutations")
                 .dataFetcher(new DataFetcher<Object>() {
                     @Override
                     public Object get(DataFetchingEnvironment environment) {
@@ -405,25 +149,25 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                 .name("CXS_Query")
                 .description("Root CXS query type")
                 .field(newFieldDefinition()
-                        .type(new GraphQLList(registeredOutputTypes.get(CXSEventType.class.getName())))
+                        .type(new GraphQLList(getOutputTypeFromRegistry(CXSEventType.class.getName())))
                         .name("getEventTypes")
                         .description("Retrieves the list of all the declared CXS event types in the Apache Unomi server")
                 )
                 .field(newFieldDefinition()
-                        .type(new GraphQLList(registeredOutputTypes.get("CXS_Event")))
+                        .type(new GraphQLList(getOutputTypeFromRegistry("CXS_Event")))
                         .name("getEvent")
                         .description("Retrieves a specific event")
                 )
                 .field(newFieldDefinition()
-                        .type(new GraphQLList(registeredOutputTypes.get("CXS_EventConnection")))
+                        .type(new GraphQLList(getOutputTypeFromRegistry("CXS_EventConnection")))
                         .name("findEvents")
                         .argument(newArgument()
                                 .name("filter")
-                                .type(registeredInputTypes.get("CXS_EventFilterInput"))
+                                .type(getInputTypeFromRegistry("CXS_EventFilterInput"))
                         )
                         .argument(newArgument()
                                 .name("orderBy")
-                                .type(registeredInputTypes.get(CXSOrderByInput.class.getName()))
+                                .type(getInputTypeFromRegistry(CXSOrderByInput.class.getName()))
                         )
                         .argument(newArgument()
                                 .name("first")
@@ -447,6 +191,15 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                         )
                         .description("Retrieves the events that match the specified filters")
                 )
+                .field(newFieldDefinition()
+                        .type(getOutputTypeFromRegistry("CXS_Segment"))
+                        .name("getSegment")
+                        .argument(newArgument()
+                                .name("segmentId")
+                                .type(GraphQLString)
+                                .description("Unique identifier for the segment")
+                        )
+                )
                 /*
                 .field(newFieldDefinition()
                         .type(new GraphQLList(registeredOutputTypes.get("CXS_ProfileConnection")))
@@ -490,11 +243,11 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                 .name("CXS_Mutation")
                 .description("Root CXS mutation type")
                 .field(newFieldDefinition()
-                        .type(registeredOutputTypes.get(CXSEventType.class.getName()))
+                        .type(getOutputTypeFromRegistry(CXSEventType.class.getName()))
                         .name("createOrUpdateEventType")
                         .argument(newArgument()
                                 .name("eventType")
-                                .type(registeredInputTypes.get(CXSEventTypeInput.class.getName()))
+                                .type(getInputTypeFromRegistry(CXSEventTypeInput.class.getName()))
                         )
                         .description("Create or updates a CXS event type in the Apache Unomi server")
                         .dataFetcher(new DataFetcher<CXSEventType>() {
@@ -533,7 +286,7 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                         .description("Processes events sent to the Context Server")
                         .argument(newArgument()
                                 .name("events")
-                                .type(new GraphQLList(registeredInputTypes.get("CXS_EventInput"))))
+                                .type(new GraphQLList(getInputTypeFromRegistry("CXS_EventInput"))))
                         .type(GraphQLInt)
                 )
                 .build();
@@ -599,146 +352,5 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
         }
     }
 
-    private GraphQLOutputType buildCXSEventOutputType() {
-        return newObject()
-                .name("CXS_Event")
-                .description("An event is generated by user interacting with the Context Server")
-                .field(newFieldDefinition()
-                        .type(GraphQLID)
-                        .name("id")
-                        .description("A unique identifier for the event")
-                        .dataFetcher(new DataFetcher() {
-                            public Object get(DataFetchingEnvironment environment) {
-                                CXSEvent CXSEvent = environment.getSource();
-                                return CXSEvent.getId();
-                            }
-                        })
-                )
-                .field(newFieldDefinition()
-                        .type(GraphQLString)
-                        .name("eventType")
-                        .description("An identifier for the event type")
-                        .dataFetcher(new DataFetcher() {
-                            public Object get(DataFetchingEnvironment environment) {
-                                CXSEvent CXSEvent = environment.getSource();
-                                return CXSEvent.getEventType();
-                            }
-                        })
-                )
-                .field(newFieldDefinition()
-                        .type(GraphQLLong)
-                        .name("timestamp")
-                        .description("The difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.")
-                        .dataFetcher(new DataFetcher() {
-                            public Object get(DataFetchingEnvironment environment) {
-                                CXSEvent CXSEvent = environment.getSource();
-                                return CXSEvent.getTimeStamp();
-                            }
-                        }))
-                .field(newFieldDefinition()
-                        .type(GraphQLString)
-                        .name("subject")
-                        .description("The entity that has fired the event (using the profile)")
-                        .dataFetcher(new DataFetcher() {
-                            public Object get(DataFetchingEnvironment environment) {
-                                CXSEvent CXSEvent = environment.getSource();
-                                return CXSEvent.getSubject();
-                            }
-                        }))
-                .field(newFieldDefinition()
-                        .type(GraphQLString)
-                        .name("object")
-                        .description("The object on which the event was fired.")
-                        .dataFetcher(new DataFetcher() {
-                            public Object get(DataFetchingEnvironment environment) {
-                                CXSEvent CXSEvent = environment.getSource();
-                                return CXSEvent.getObject();
-                            }
-                        })
-                )
-                .field(newFieldDefinition()
-                        .type(registeredOutputTypes.get(CXSGeoPoint.class.getName()))
-                        .name("location")
-                        .description("The geo-point location where the event was fired.")
-                        .dataFetcher(new DataFetcher() {
-                            public Object get(DataFetchingEnvironment environment) {
-                                CXSEvent CXSEvent = environment.getSource();
-                                return CXSEvent.getLocation();
-                            }
-                        })
-                )
-                .field(newFieldDefinition()
-                        .type(new GraphQLList(registeredOutputTypes.get("CXS_EventProperties")))
-                        .name("properties")
-                        .description("Generic properties for the event")
-                        .dataFetcher(new DataFetcher() {
-                            public Object get(DataFetchingEnvironment environment) {
-                                CXSEvent CXSEvent = environment.getSource();
-                                return new ArrayList<Map.Entry<Object,Object>>(CXSEvent.getProperties().entrySet());
-                            }
-                        })
-                )
-                .build();
-    }
-
-    private GraphQLOutputType buildCXSEventPropertiesOutputType() {
-        GraphQLObjectType.Builder eventPropertiesOutputType = newObject()
-                .name("CXS_EventProperties")
-                .description("All possible properties of an event");
-
-        // we create a dummy field because GraphQL requires at least one
-        eventPropertiesOutputType.field(newFieldDefinition()
-                .type(GraphQLInt)
-                .name("typeCount")
-                .description("Total count of different field types")
-        );
-
-        for (Map.Entry<String,CXSEventType> cxsEventTypeEntry : eventTypes.entrySet()) {
-            CXSEventType cxsEventType = cxsEventTypeEntry.getValue();
-            eventPropertiesOutputType
-                    .field(newFieldDefinition()
-                            .type(buildEventOutputType(cxsEventType.typeName, cxsEventType.properties))
-                            .name(cxsEventTypeEntry.getKey())
-                    );
-        }
-
-        return eventPropertiesOutputType.build();
-    }
-
-    private GraphQLOutputType buildEventOutputType(String typeName, List<CXSPropertyType> propertyTypes) {
-        String eventTypeName = typeName.substring(0, 1).toUpperCase() + typeName.substring(1) + "EventType";
-        GraphQLObjectType.Builder eventOutputType = newObject()
-                .name(eventTypeName)
-                .description("Event type object for event type " + typeName);
-
-        for (CXSPropertyType cxsEventPropertyType : propertyTypes) {
-            GraphQLOutputType eventPropertyOutputType = null;
-            if (cxsEventPropertyType instanceof CXSIdentifierPropertyType) {
-                eventPropertyOutputType = GraphQLID;
-            } else if (cxsEventPropertyType instanceof CXSStringPropertyType) {
-                eventPropertyOutputType = GraphQLString;
-            } else if (cxsEventPropertyType instanceof CXSIntPropertyType) {
-                eventPropertyOutputType = GraphQLInt;
-            } else if (cxsEventPropertyType instanceof CXSFloatPropertyType) {
-                eventPropertyOutputType = GraphQLFloat;
-            } else if (cxsEventPropertyType instanceof CXSBooleanPropertyType) {
-                eventPropertyOutputType = GraphQLBoolean;
-            } else if (cxsEventPropertyType instanceof CXSDatePropertyType) {
-                eventPropertyOutputType = GraphQLString;
-            } else if (cxsEventPropertyType instanceof CXSGeoPointPropertyType) {
-                eventPropertyOutputType = registeredOutputTypes.get(CXSGeoPoint.class.getName());
-            } else if (cxsEventPropertyType instanceof CXSSetPropertyType) {
-                eventPropertyOutputType = buildEventOutputType(cxsEventPropertyType.name, ((CXSSetPropertyType)cxsEventPropertyType).properties);
-            }
-            eventOutputType
-                    .field(newFieldDefinition()
-                            .type(eventPropertyOutputType)
-                            .name(cxsEventPropertyType.name)
-                    );
-        }
-
-
-        return eventOutputType.build();
-    }
 
 }
diff --git a/graphql/karaf-feature/pom.xml b/graphql/karaf-feature/pom.xml
index 011e1eb..c61df57 100644
--- a/graphql/karaf-feature/pom.xml
+++ b/graphql/karaf-feature/pom.xml
@@ -27,6 +27,8 @@
     <packaging>feature</packaging>
 
     <artifactId>cxs-graphql-feature</artifactId>
+    <name>Apache Unomi :: GraphQL API :: Karaf Feature</name>
+    <description>Apache Unomi Context GraphQL API Karaf Feature</description>
 
     <dependencies>
 
diff --git a/graphql/pom.xml b/graphql/pom.xml
index bc03766..ea476f6 100644
--- a/graphql/pom.xml
+++ b/graphql/pom.xml
@@ -27,7 +27,7 @@
 
     <artifactId>unomi-graphql</artifactId>
     <name>Apache Unomi :: GraphQL API</name>
-    <description>Apache Unomi Context GraphQL API</description>
+    <description>Apache Unomi Context GraphQL API Root Project</description>
     <packaging>pom</packaging>
 
     <properties>


[unomi] 03/15: UNOMI-180 Implement CXS GraphQL API - First implementation of registering event types. Not yet perfect but some parts are working.

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch UNOMI-180-CXS-GRAPHQLAPI
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit 50a98ffa61d4a561c9cd5459c122cde5c144e627
Author: Serge Huber <sh...@apache.org>
AuthorDate: Thu May 17 21:33:59 2018 +0200

    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 <sh...@apache.org>
---
 .../unomi/graphql/AbstractPropertyTypeInput.java   |  40 ------
 ...yTypeInput.java => CXSBooleanPropertyType.java} |   4 +-
 ...ertyTypeInput.java => CXSDatePropertyType.java} |   2 +-
 .../org/apache/unomi/graphql/CXSEventType.java     |  13 ++
 ...rtyTypeInput.java => CXSFloatPropertyType.java} |   2 +-
 ...TypeInput.java => CXSGeoPointPropertyType.java} |   2 +-
 .../apache/unomi/graphql/CXSGraphQLProvider.java   |   2 +
 ...peInput.java => CXSIdentifierPropertyType.java} |   2 +-
 ...pertyTypeInput.java => CXSIntPropertyType.java} |   2 +-
 .../org/apache/unomi/graphql/CXSPropertyType.java  |  26 ++--
 .../apache/unomi/graphql/CXSPropertyTypeInput.java |  14 +-
 .../apache/unomi/graphql/CXSProviderManager.java   |  51 +------
 ...pertyTypeInput.java => CXSSetPropertyType.java} |   4 +-
 .../unomi/graphql/CXSSetPropertyTypeInput.java     |   3 +-
 ...tyTypeInput.java => CXSStringPropertyType.java} |   2 +-
 .../graphql/internal/CXSGraphQLProviderImpl.java   | 157 ++++++++++++++++++---
 .../CXSProviderManagerImpl.java}                   |  20 ++-
 17 files changed, 209 insertions(+), 137 deletions(-)

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..0000000
--- 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<String> tags;
-    @GraphQLField
-    public List<String> systemTags;
-    @GraphQLField
-    public boolean personalData;
-
-}
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/CXSBooleanPropertyType.java
similarity index 89%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyTypeInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyType.java
index 3843f5a..caea959 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyType.java
@@ -19,8 +19,8 @@ package org.apache.unomi.graphql;
 import graphql.annotations.annotationTypes.GraphQLField;
 import graphql.annotations.annotationTypes.GraphQLName;
 
-@GraphQLName("CXSBooleanPropertyTypeInput")
-public class CXSBooleanPropertyTypeInput extends AbstractPropertyTypeInput {
+@GraphQLName("CXSBooleanPropertyType")
+public class CXSBooleanPropertyType extends CXSPropertyType {
 
     @GraphQLField
     public boolean defaultValue;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDatePropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDatePropertyType.java
similarity index 92%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDatePropertyTypeInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDatePropertyType.java
index e8036aa..362d2bc 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDatePropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDatePropertyType.java
@@ -18,7 +18,7 @@ package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 
-public class CXSDatePropertyTypeInput extends AbstractPropertyTypeInput {
+public class CXSDatePropertyType extends CXSPropertyType {
 
     @GraphQLField
     public String defaultValue;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java
index 43f04fb..a7c1c2c 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventType.java
@@ -17,10 +17,23 @@
 package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
+import graphql.annotations.annotationTypes.GraphQLName;
 
+import java.util.List;
+
+@GraphQLName("CXS_EventType")
 public class CXSEventType {
 
     @GraphQLField
     public String id;
 
+    @GraphQLField
+    public String scope;
+
+    @GraphQLField
+    public String typeName;
+
+    @GraphQLField
+    public List<CXSPropertyType> properties;
+
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSFloatPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSFloatPropertyType.java
similarity index 93%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSFloatPropertyTypeInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSFloatPropertyType.java
index 038f4a5..229b8db 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSFloatPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSFloatPropertyType.java
@@ -18,7 +18,7 @@ package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 
-public class CXSFloatPropertyTypeInput extends AbstractPropertyTypeInput{
+public class CXSFloatPropertyType extends CXSPropertyType {
 
     @GraphQLField
     public float minValue;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointPropertyType.java
similarity index 92%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointPropertyTypeInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointPropertyType.java
index c32def1..ce218c8 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGeoPointPropertyType.java
@@ -18,7 +18,7 @@ package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 
-public class CXSGeoPointPropertyTypeInput extends AbstractPropertyTypeInput {
+public class CXSGeoPointPropertyType extends CXSPropertyType {
 
     @GraphQLField
     public String defaultValue;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
index 01f2636..ae444b9 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSGraphQLProvider.java
@@ -18,4 +18,6 @@ package org.apache.unomi.graphql;
 
 public interface CXSGraphQLProvider {
 
+    void setCxsProviderManager(CXSProviderManager cxsProviderManager);
+
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSStringPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIdentifierPropertyType.java
similarity index 92%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSStringPropertyTypeInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIdentifierPropertyType.java
index c44496f..11f0742 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSStringPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIdentifierPropertyType.java
@@ -18,7 +18,7 @@ package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 
-public class CXSStringPropertyTypeInput extends AbstractPropertyTypeInput {
+public class CXSIdentifierPropertyType extends CXSPropertyType {
 
     @GraphQLField
     public String regexp;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIntPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIntPropertyType.java
similarity index 93%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIntPropertyTypeInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIntPropertyType.java
index f2dac72..c7c904f 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIntPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIntPropertyType.java
@@ -18,7 +18,7 @@ package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 
-public class CXSIntPropertyTypeInput extends AbstractPropertyTypeInput {
+public class CXSIntPropertyType extends CXSPropertyType {
 
     @GraphQLField
     public int minValue;
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyType.java
index a55a04b..641eff4 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyType.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyType.java
@@ -16,17 +16,25 @@
  */
 package org.apache.unomi.graphql;
 
-import java.util.LinkedHashSet;
-import java.util.Set;
+import graphql.annotations.annotationTypes.GraphQLField;
+
+import java.util.List;
 
 public class CXSPropertyType {
 
-    private String id;
-    private String name;
-    private int minOccurrences = 0;
-    private int maxOccurrences = 1;
-    private Set<String> tags = new LinkedHashSet<>();
-    private Set<String> systemTags = new LinkedHashSet<>();
-    private boolean personalData = false;
+    @GraphQLField
+    public String id;
+    @GraphQLField
+    public String name;
+    @GraphQLField
+    public int minOccurrences;
+    @GraphQLField
+    public int maxOccurrences;
+    @GraphQLField
+    public List<String> tags;
+    @GraphQLField
+    public List<String> systemTags;
+    @GraphQLField
+    public boolean personalData;
 
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
index 60a1aa4..900cc4a 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSPropertyTypeInput.java
@@ -24,31 +24,31 @@ public class CXSPropertyTypeInput {
 
     @GraphQLField
     @GraphQLName("identifier")
-    public CXSIdentifierPropertyTypeInput identifierPropertyTypeInput;
+    public CXSIdentifierPropertyType identifierPropertyTypeInput;
 
     @GraphQLField
     @GraphQLName("string")
-    public CXSStringPropertyTypeInput stringPropertyTypeInput;
+    public CXSStringPropertyType stringPropertyTypeInput;
 
     @GraphQLField
     @GraphQLName("int")
-    public CXSIntPropertyTypeInput integer;
+    public CXSIntPropertyType integer;
 
     @GraphQLField
     @GraphQLName("float")
-    public CXSFloatPropertyTypeInput floatPropertyTypeInput;
+    public CXSFloatPropertyType floatPropertyTypeInput;
 
     @GraphQLField
     @GraphQLName("date")
-    public CXSDatePropertyTypeInput datePropertyTypeInput;
+    public CXSDatePropertyType datePropertyTypeInput;
 
     @GraphQLField
     @GraphQLName("boolean")
-    public CXSBooleanPropertyTypeInput booleanPropertyTypeInput;
+    public CXSBooleanPropertyType booleanPropertyTypeInput;
 
     @GraphQLField
     @GraphQLName("geopoint")
-    public CXSGeoPointPropertyTypeInput geoPointPropertyTypeInput;
+    public CXSGeoPointPropertyType geoPointPropertyTypeInput;
 
     @GraphQLField
     @GraphQLName("set")
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java
index a341a9f..18c7533 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java
@@ -16,55 +16,8 @@
  */
 package org.apache.unomi.graphql;
 
-import graphql.servlet.GraphQLMutationProvider;
-import graphql.servlet.GraphQLQueryProvider;
-import graphql.servlet.GraphQLTypesProvider;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.service.component.ComponentContext;
-import org.osgi.service.component.annotations.Activate;
-import org.osgi.service.component.annotations.Component;
-import org.osgi.service.component.annotations.Deactivate;
-import org.osgi.service.component.annotations.Reference;
+public interface CXSProviderManager {
 
-import java.util.Map;
-
-@Component(
-        name="CXSProviderManager",
-        immediate = true
-)
-public class CXSProviderManager {
-
-    @Reference(name = "CXSGraphQLProvider")
-    private CXSGraphQLProvider cxsGraphQLProvider;
-    private ServiceRegistration<?> providerSR;
-    private BundleContext bundleContext;
-
-    @Activate
-    void activate(
-            ComponentContext componentContext,
-            BundleContext bundleContext,
-            Map<String,Object> config) {
-        this.bundleContext = bundleContext;
-    }
-
-    @Deactivate
-    void deactivate(
-            ComponentContext componentContext,
-            BundleContext bundleContext,
-            Map<String,Object> config) {
-    }
-
-    void refreshProviders() {
-        if (providerSR != null) {
-            providerSR.unregister();
-            providerSR = null;
-            providerSR = bundleContext.registerService(new String[] {
-                    GraphQLQueryProvider.class.getName(),
-                    GraphQLTypesProvider.class.getName(),
-                    GraphQLMutationProvider.class.getName()
-            }, cxsGraphQLProvider, null);
-        }
-    }
+    void refreshProviders();
 
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyType.java
similarity index 88%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyType.java
index 5db69dd..3c054ae 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyType.java
@@ -20,8 +20,8 @@ import graphql.annotations.annotationTypes.GraphQLField;
 
 import java.util.List;
 
-public class CXSSetPropertyTypeInput extends AbstractPropertyTypeInput {
+public class CXSSetPropertyType extends CXSPropertyType {
 
     @GraphQLField
-    public List<CXSPropertyTypeInput> properties;
+    public List<CXSPropertyType> properties;
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
index 5db69dd..2f0de04 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSSetPropertyTypeInput.java
@@ -20,8 +20,9 @@ import graphql.annotations.annotationTypes.GraphQLField;
 
 import java.util.List;
 
-public class CXSSetPropertyTypeInput extends AbstractPropertyTypeInput {
+public class CXSSetPropertyTypeInput extends CXSPropertyType {
 
     @GraphQLField
     public List<CXSPropertyTypeInput> properties;
+
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIdentifierPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSStringPropertyType.java
similarity index 92%
rename from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIdentifierPropertyTypeInput.java
rename to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSStringPropertyType.java
index 49869bc..2a4ef90 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSIdentifierPropertyTypeInput.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSStringPropertyType.java
@@ -18,7 +18,7 @@ package org.apache.unomi.graphql;
 
 import graphql.annotations.annotationTypes.GraphQLField;
 
-public class CXSIdentifierPropertyTypeInput extends AbstractPropertyTypeInput {
+public class CXSStringPropertyType extends CXSPropertyType {
 
     @GraphQLField
     public String regexp;
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 b9e876a..ea2043d 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
@@ -29,9 +29,9 @@ 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.Activate;
-import org.osgi.service.component.annotations.Component;
 import org.osgi.service.component.annotations.Deactivate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.*;
 
@@ -40,23 +40,24 @@ import static graphql.schema.GraphQLArgument.newArgument;
 import static graphql.schema.GraphQLFieldDefinition.newFieldDefinition;
 import static graphql.schema.GraphQLObjectType.newObject;
 
-@Component(
-        name = "CXSGraphQLProvider",
-        immediate = true
-)
 public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryProvider, GraphQLTypesProvider, GraphQLMutationProvider {
 
+    private static final Logger logger = LoggerFactory.getLogger(CXSGraphQLProviderImpl.class.getName());
+
     private Map<String,GraphQLOutputType> registeredOutputTypes = new TreeMap<>();
     private Map<String,GraphQLInputType> registeredInputTypes = new TreeMap<>();
+    private CXSProviderManager cxsProviderManager;
 
-    @Activate
-    void activate(
-            ComponentContext cc,
-            BundleContext bc,
-            Map<String,Object> config) {
+    private Map<String,CXSEventType> eventTypes = new TreeMap<>();
 
+    public CXSGraphQLProviderImpl() {
+        updateGraphQLTypes();
+    }
+
+    private void updateGraphQLTypes() {
         registeredOutputTypes.put(CXSGeoPoint.class.getName(), GraphQLAnnotations.object(CXSGeoPoint.class));
-        registeredOutputTypes.put(CXSProperties.class.getName(), GraphQLAnnotations.object(CXSProperties.class));
+        registeredOutputTypes.put(CXSSetPropertyType.class.getName(), GraphQLAnnotations.object(CXSSetPropertyType.class));
+        registeredOutputTypes.put("CXS_EventProperties", buildCXSEventPropertiesOutputType());
         registeredOutputTypes.put(CXSEventType.class.getName(), GraphQLAnnotations.object(CXSEventType.class));
 
         GraphQLObjectInfoRetriever graphQLObjectInfoRetriever = new GraphQLObjectInfoRetriever();
@@ -79,6 +80,10 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
         registeredOutputTypes.clear();
     }
 
+    public void setCxsProviderManager(CXSProviderManager cxsProviderManager) {
+        this.cxsProviderManager = cxsProviderManager;
+    }
+
     @Override
     public Collection<GraphQLFieldDefinition> getQueries() {
         List<GraphQLFieldDefinition> fieldDefinitions = new ArrayList<GraphQLFieldDefinition>();
@@ -107,10 +112,11 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                 .type(registeredOutputTypes.get("CXS_Mutation"))
                 .name("cxs")
                 .description("Root field for all CXS mutation")
-                .dataFetcher(new DataFetcher() {
+                .dataFetcher(new DataFetcher<Object>() {
+                    @Override
                     public Object get(DataFetchingEnvironment environment) {
-                        Map<String,Object> map = environment.getContext();
-                        return map.keySet();
+                        Object contextObject = environment.getContext();
+                        return contextObject;
                     }
                 }).build());
         return fieldDefinitions;
@@ -125,6 +131,11 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                         .name("getEventTypes")
                         .description("Retrieves the list of all the declared CXS event types in the Apache Unomi server")
                 )
+                .field(newFieldDefinition()
+                        .type(new GraphQLList(registeredOutputTypes.get("CXS_Event")))
+                        .name("getEvent")
+                        .description("Retrieves a specific event")
+                )
                 .build();
     }
 
@@ -140,10 +151,99 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                                 .type(registeredInputTypes.get(CXSEventTypeInput.class.getName()))
                         )
                         .description("Create or updates a CXS event type in the Apache Unomi server")
+                        .dataFetcher(new DataFetcher<CXSEventType>() {
+                            @Override
+                            public CXSEventType get(DataFetchingEnvironment environment) {
+                                Map<String,Object> arguments = environment.getArguments();
+                                CXSEventType cxsEventType = new CXSEventType();
+                                if (arguments.containsKey("eventType")) {
+                                    Map<String,Object> eventTypeArguments = (Map<String,Object>) arguments.get("eventType");
+                                    if (eventTypeArguments.containsKey("typeName")) {
+                                        cxsEventType.id = (String) eventTypeArguments.get("typeName");
+                                        cxsEventType.typeName = (String) eventTypeArguments.get("typeName");
+                                    }
+                                    cxsEventType.properties = new ArrayList<>();
+                                    if (eventTypeArguments.containsKey("properties")) {
+                                        List<Map<String, Object>> properties = (List<Map<String, Object>>) eventTypeArguments.get("properties");
+                                        for (Map<String, Object> propertyTypeMap : properties) {
+                                            CXSPropertyType cxsPropertyType = getPropertyType(propertyTypeMap);
+                                            if (cxsPropertyType != null) {
+                                                cxsEventType.properties.add(cxsPropertyType);
+                                            }
+                                        }
+                                    }
+                                }
+                                eventTypes.put(cxsEventType.typeName, cxsEventType);
+                                updateGraphQLTypes();
+                                if (cxsProviderManager != null) {
+                                    cxsProviderManager.refreshProviders();
+                                }
+                                return cxsEventType;
+                            }
+                        })
                 )
                 .build();
     }
 
+    private CXSPropertyType getPropertyType(Map<String, Object> propertyTypeMap) {
+        if (propertyTypeMap.size() > 1) {
+            logger.error("Only one property type is allowed for each property !");
+            return null;
+        }
+        CXSPropertyType propertyType = null;
+        if (propertyTypeMap.containsKey("identifier")) {
+            propertyType = getIdentifierPropertyType(propertyTypeMap);
+        } else if (propertyTypeMap.containsKey("string")) {
+            propertyType = getStringPropertyType(propertyTypeMap);
+        } else if (propertyTypeMap.containsKey("set")) {
+            propertyType = getSetPropertyType(propertyTypeMap);
+        }
+        return propertyType;
+    }
+
+    private CXSPropertyType getSetPropertyType(Map<String, Object> propertyTypeMap) {
+        CXSSetPropertyType cxsSetPropertyType = new CXSSetPropertyType();
+        Map<String,Object> setPropertyTypeMap = (Map<String,Object>) propertyTypeMap.get("set");
+        populateCommonProperties(setPropertyTypeMap, cxsSetPropertyType);
+        if (propertyTypeMap.containsKey("properties")) {
+            List<Map<String,Object>> propertyList = (List<Map<String,Object>>) setPropertyTypeMap.get("properties");
+            List<CXSPropertyType> setProperties = new ArrayList<>();
+            for (Map<String,Object> setProperty : propertyList) {
+                CXSPropertyType subPropertyType = getPropertyType(setProperty);
+                if (subPropertyType != null) {
+                    setProperties.add(subPropertyType);
+                }
+            }
+            cxsSetPropertyType.properties = setProperties;
+        }
+        return cxsSetPropertyType;
+    }
+
+    private CXSPropertyType getStringPropertyType(Map<String, Object> propertyTypeMap) {
+        CXSStringPropertyType cxsStringPropertyType = new CXSStringPropertyType();
+        Map<String,Object> stringPropertyTypeMap = (Map<String,Object>) propertyTypeMap.get("string");
+        populateCommonProperties(stringPropertyTypeMap, cxsStringPropertyType);
+        return cxsStringPropertyType;
+    }
+
+    private CXSPropertyType getIdentifierPropertyType(Map<String, Object> propertyTypeMap) {
+        CXSIdentifierPropertyType cxsIdentifierPropertyType = new CXSIdentifierPropertyType();
+        Map<String,Object> identifierPropertyTypeMap = (Map<String,Object>) propertyTypeMap.get("identifier");
+        populateCommonProperties(identifierPropertyTypeMap, cxsIdentifierPropertyType);
+        return cxsIdentifierPropertyType;
+    }
+
+    private void populateCommonProperties(Map<String, Object> propertyTypeMap, CXSPropertyType cxsPropertyType) {
+        if (propertyTypeMap == null || propertyTypeMap.size() == 0) {
+            return;
+        }
+        if (propertyTypeMap.containsKey("id")) {
+            cxsPropertyType.id = (String) propertyTypeMap.get("id");
+        }
+        if (propertyTypeMap.containsKey("name")) {
+            cxsPropertyType.name = (String) propertyTypeMap.get("name");
+        }
+    }
 
     private GraphQLOutputType buildCXSEventOutputType() {
         return newObject()
@@ -214,7 +314,7 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                         })
                 )
                 .field(newFieldDefinition()
-                        .type(new GraphQLList(registeredOutputTypes.get(CXSProperties.class.getName())))
+                        .type(new GraphQLList(registeredOutputTypes.get("CXS_EventProperties")))
                         .name("properties")
                         .description("Generic properties for the event")
                         .dataFetcher(new DataFetcher() {
@@ -226,4 +326,29 @@ public class CXSGraphQLProviderImpl implements CXSGraphQLProvider, GraphQLQueryP
                 )
                 .build();
     }
+
+    private GraphQLOutputType buildCXSEventPropertiesOutputType() {
+        GraphQLObjectType.Builder eventPropertiesOutputType = newObject()
+                .name("CXS_EventProperties")
+                .description("All possible properties of an event");
+
+        // we create a dummy field because GraphQL requires at least one
+        eventPropertiesOutputType.field(newFieldDefinition()
+                .type(GraphQLInt)
+                .name("typeCount")
+                .description("Total count of different field types")
+        );
+
+        for (Map.Entry<String,CXSEventType> cxsEventTypeEntry : eventTypes.entrySet()) {
+            CXSEventType cxsEventType = cxsEventTypeEntry.getValue();
+            eventPropertiesOutputType
+                    .field(newFieldDefinition()
+                            .type(registeredOutputTypes.get(CXSSetPropertyType.class.getName()))
+                            .name(cxsEventTypeEntry.getKey())
+                    );
+        }
+
+        return eventPropertiesOutputType.build();
+    }
+
 }
diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
similarity index 74%
copy from graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java
copy to graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
index a341a9f..8b7b80a 100644
--- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSProviderManager.java
+++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CXSProviderManagerImpl.java
@@ -14,18 +14,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.unomi.graphql;
+package org.apache.unomi.graphql.internal;
 
 import graphql.servlet.GraphQLMutationProvider;
 import graphql.servlet.GraphQLQueryProvider;
 import graphql.servlet.GraphQLTypesProvider;
+import org.apache.unomi.graphql.CXSGraphQLProvider;
+import org.apache.unomi.graphql.CXSProviderManager;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.component.ComponentContext;
 import org.osgi.service.component.annotations.Activate;
 import org.osgi.service.component.annotations.Component;
 import org.osgi.service.component.annotations.Deactivate;
-import org.osgi.service.component.annotations.Reference;
 
 import java.util.Map;
 
@@ -33,9 +34,8 @@ import java.util.Map;
         name="CXSProviderManager",
         immediate = true
 )
-public class CXSProviderManager {
+public class CXSProviderManagerImpl implements CXSProviderManager {
 
-    @Reference(name = "CXSGraphQLProvider")
     private CXSGraphQLProvider cxsGraphQLProvider;
     private ServiceRegistration<?> providerSR;
     private BundleContext bundleContext;
@@ -46,6 +46,13 @@ public class CXSProviderManager {
             BundleContext bundleContext,
             Map<String,Object> config) {
         this.bundleContext = bundleContext;
+        this.cxsGraphQLProvider = new CXSGraphQLProviderImpl();
+        this.cxsGraphQLProvider.setCxsProviderManager(this);
+        providerSR = bundleContext.registerService(new String[] {
+                GraphQLQueryProvider.class.getName(),
+                GraphQLTypesProvider.class.getName(),
+                GraphQLMutationProvider.class.getName()
+        }, cxsGraphQLProvider, null);
     }
 
     @Deactivate
@@ -53,9 +60,12 @@ public class CXSProviderManager {
             ComponentContext componentContext,
             BundleContext bundleContext,
             Map<String,Object> config) {
+        providerSR.unregister();
+        cxsGraphQLProvider.setCxsProviderManager(null);
+        cxsGraphQLProvider = null;
     }
 
-    void refreshProviders() {
+    public void refreshProviders() {
         if (providerSR != null) {
             providerSR.unregister();
             providerSR = null;