[unomi] branch UNOMI-180-CXS-GRAPHQLAPI updated (241a579 -> ed513da)
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. from 241a579 UNOMI-180 - Updated GraphQL projects to latest version - Added CDP SDL schema generated from latest CDP specification new d72020a UNOMI-180 - Start building a new servlet that loads the SDL schema and will combine it with dynamic type registration. - Deactivated old graphql-java-servlet for the moment. new ed513da UNOMI-180 CDP Specification implementation - Get CDP feature to install properly (but it doesn't start yet since it is missing custom scalar and event registrations) - Fixed GraphQL schema JSON encoding to UTF-8 - Removed references to incubating that are no longer needed. The 2 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: graphql/cxs-impl/pom.xml | 4 +- .../unomi/graphql/internal/CDPSDLServletImpl.java | 106 +++ .../src/main/resources/cdp-schema.graphqls | 978 + graphql/cxs-impl/src/main/resources/cdp-schema.sdl | Bin 45752 -> 0 bytes graphql/karaf-feature/pom.xml | 9 +- graphql/pom.xml| 2 +- 6 files changed, 1091 insertions(+), 8 deletions(-) create mode 100644 graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java create mode 100644 graphql/cxs-impl/src/main/resources/cdp-schema.graphqls delete mode 100644 graphql/cxs-impl/src/main/resources/cdp-schema.sdl
[unomi] 01/02: UNOMI-180 - Start building a new servlet that loads the SDL schema and will combine it with dynamic type registration. - Deactivated old graphql-java-servlet for the moment.
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 d72020a4c06adbb64d9cc9607f6e694c62a679c9 Author: sergehuber AuthorDate: Sun May 12 22:12:14 2019 +0200 UNOMI-180 - Start building a new servlet that loads the SDL schema and will combine it with dynamic type registration. - Deactivated old graphql-java-servlet for the moment. --- .../unomi/graphql/internal/CDPSDLServletImpl.java | 105 + .../{cdp-schema.sdl => cdp-schema.graphqls}| Bin graphql/karaf-feature/pom.xml | 6 +- 3 files changed, 109 insertions(+), 2 deletions(-) diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java new file mode 100644 index 000..dfd1ca6 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java @@ -0,0 +1,105 @@ +/* + * 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.schema.GraphQLSchema; +import graphql.schema.StaticDataFetcher; +import graphql.schema.idl.RuntimeWiring; +import graphql.schema.idl.SchemaGenerator; +import graphql.schema.idl.SchemaParser; +import graphql.schema.idl.TypeDefinitionRegistry; +import org.osgi.framework.BundleContext; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.Reference; + +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.Reader; + +import static graphql.schema.idl.TypeRuntimeWiring.newTypeWiring; + +@Component( + service={javax.servlet.http.HttpServlet.class,javax.servlet.Servlet.class}, +property = {"alias=/graphql", "jmx.objectname=graphql.servlet:type=graphql"} +) +public class CDPSDLServletImpl extends HttpServlet { + +@Reference +private BundleContext bundleContext; + +RuntimeWiring buildRuntimeWiring() { +return RuntimeWiring.newRuntimeWiring() +// .scalar(CustomScalar) +// this uses builder function lambda syntax +/* +.type("QueryType", typeWiring -> typeWiring +.dataFetcher("hero", new StaticDataFetcher(StarWarsData.getArtoo())) +.dataFetcher("human", StarWarsData.getHumanDataFetcher()) +.dataFetcher("droid", StarWarsData.getDroidDataFetcher()) +) +.type("Human", typeWiring -> typeWiring +.dataFetcher("friends", StarWarsData.getFriendsDataFetcher()) +) +// you can use builder syntax if you don't like the lambda syntax +.type("Droid", typeWiring -> typeWiring +.dataFetcher("friends", StarWarsData.getFriendsDataFetcher()) +) +// or full builder syntax if that takes your fancy +.type( +newTypeWiring("Character") + .typeResolver(StarWarsData.getCharacterTypeResolver()) +.build() +) +*/ +.build(); +} + +@Override +public void init(ServletConfig config) throws ServletException { +super.init(config); + +SchemaParser schemaParser = new SchemaParser(); +SchemaGenerator schemaGenerator = new SchemaGenerator(); + +Reader schemaReader = getSchemaReader("cdp-schema.graphqls"); +//File schemaFile2 = loadSchema("cdp-schema.graphqls"); +//File schemaFile3 = loadSchema("cdp-schema.graphqls"); + +TypeDefinitionRegistry typeRegistry = new TypeDefinitionRegistry(); + +// each registry is merged into the main registry +typeRegistry.merge(schemaParser.parse(schemaReader)); +//typeRegistry.merge(schemaParse
[unomi] 02/02: UNOMI-180 CDP Specification implementation - Get CDP feature to install properly (but it doesn't start yet since it is missing custom scalar and event registrations) - Fixed GraphQL sch
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 ed513dae2aa4ae3846d13e1401636983996bf8bc Author: sergehuber AuthorDate: Sun May 12 23:49:05 2019 +0200 UNOMI-180 CDP Specification implementation - Get CDP feature to install properly (but it doesn't start yet since it is missing custom scalar and event registrations) - Fixed GraphQL schema JSON encoding to UTF-8 - Removed references to incubating that are no longer needed. --- graphql/cxs-impl/pom.xml| 4 ++-- .../unomi/graphql/internal/CDPSDLServletImpl.java | 17 + .../cxs-impl/src/main/resources/cdp-schema.graphqls | Bin 45752 -> 22300 bytes graphql/karaf-feature/pom.xml | 11 --- graphql/pom.xml | 2 +- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/graphql/cxs-impl/pom.xml b/graphql/cxs-impl/pom.xml index 8a0e883..79cd629 100644 --- a/graphql/cxs-impl/pom.xml +++ b/graphql/cxs-impl/pom.xml @@ -21,7 +21,7 @@ org.apache.unomi unomi-graphql -1.4.0-incubating-SNAPSHOT +1.4.0-SNAPSHOT 4.0.0 @@ -76,7 +76,7 @@ org.apache.unomi unomi-api -1.4.0-incubating-SNAPSHOT +1.4.0-SNAPSHOT provided diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java index dfd1ca6..8cafa15 100644 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/internal/CDPSDLServletImpl.java @@ -16,35 +16,36 @@ */ package org.apache.unomi.graphql.internal; +import com.google.common.base.Charsets; import graphql.schema.GraphQLSchema; -import graphql.schema.StaticDataFetcher; import graphql.schema.idl.RuntimeWiring; import graphql.schema.idl.SchemaGenerator; import graphql.schema.idl.SchemaParser; import graphql.schema.idl.TypeDefinitionRegistry; import org.osgi.framework.BundleContext; +import org.osgi.service.component.annotations.Activate; import org.osgi.service.component.annotations.Component; -import org.osgi.service.component.annotations.Reference; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; -import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; -import static graphql.schema.idl.TypeRuntimeWiring.newTypeWiring; - @Component( service={javax.servlet.http.HttpServlet.class,javax.servlet.Servlet.class}, -property = {"alias=/graphql", "jmx.objectname=graphql.servlet:type=graphql"} +property = {"alias=/sdlgraphql", "jmx.objectname=graphql.servlet:type=graphql"} ) public class CDPSDLServletImpl extends HttpServlet { -@Reference private BundleContext bundleContext; +@Activate +void activate(BundleContext bundleContext) { +this.bundleContext = bundleContext; +} + RuntimeWiring buildRuntimeWiring() { return RuntimeWiring.newRuntimeWiring() // .scalar(CustomScalar) @@ -96,7 +97,7 @@ public class CDPSDLServletImpl extends HttpServlet { private Reader getSchemaReader(String resourceUrl) { try { -return new InputStreamReader(bundleContext.getBundle().getResource(resourceUrl).openConnection().getInputStream()); +return new InputStreamReader(bundleContext.getBundle().getResource(resourceUrl).openConnection().getInputStream(), Charsets.UTF_8.name()); } catch (IOException e) { e.printStackTrace(); } diff --git a/graphql/cxs-impl/src/main/resources/cdp-schema.graphqls b/graphql/cxs-impl/src/main/resources/cdp-schema.graphqls index 22fba9a..7a924ca 100644 Binary files a/graphql/cxs-impl/src/main/resources/cdp-schema.graphqls and b/graphql/cxs-impl/src/main/resources/cdp-schema.graphqls differ diff --git a/graphql/karaf-feature/pom.xml b/graphql/karaf-feature/pom.xml index 0437dba..b813872 100644 --- a/graphql/karaf-feature/pom.xml +++ b/graphql/karaf-feature/pom.xml @@ -21,7 +21,7 @@ org.apache.unomi unomi-graphql -1.4.0-incubating-SNAPSHOT +1.4.0-SNAPSHOT 4.0.0 feature @@ -59,7 +59,7 @@ com.google.guava guava -20.0 +24.1.1-jre commons-fileupload @@ -82,7 +82,6 @@ 1.0.2 - + com.graphql-java graphql-java @@ -110,17 +109,15 @@ - org.apache.unomi
[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 t
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 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 --- 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 @@ 4.0.0 cxs-graphql-api-impl +Apache Unomi :: GraphQL API :: CXS Implementation +Apache Unomi Context GraphQL API CXS Implementation bundle diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java index c278678..123dd87 100644 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java @@ -16,8 +16,7 @@ */ package org.apache.unomi.graphql; -import java.util.LinkedHashMap; -import java.util.Map; +import graphql.annotations.annotationTypes.GraphQLField; public class CXSEvent { @@ -26,33 +25,40 @@ public class CXSEvent { private long timeStamp; private String subject; private String object; -private Map properties = new LinkedHashMap<>(); +private CXSEventProperties properties = new CXSEventProperties(); private CXSGeoPoint location; +@GraphQLField public String getId() { return id; } +@GraphQLField public String getEventType() { return eventType; } +@GraphQLField public long getTimeStamp() { return timeStamp; } +@GraphQLField public String getSubject() { return subject; } +@GraphQLField public String getObject() { return object; } -public Map getProperties() { +@GraphQLField +public CXSEventProperties getProperties() { return properties; } +@GraphQLField public CXSGeoPoint getLocation() { return location; } 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 edges; +@GraphQLField +public PageInfo pageInfo; } diff --git a/graphql/cxs-impl/src/main/java/org/ap
[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
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 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 --- .../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] 15/15: UNOMI-180 - Updated GraphQL projects to latest version - Added CDP SDL schema generated from latest CDP specification
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 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 000..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 @@ pom -7.1.0 -11.0 - 6.1 +7.4.1 +12.0 + 7.0 2.9.7
[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, notab
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 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 --- .../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 000..ad7ae5e --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/AbstractPropertyTypeInput.java @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.unomi.graphql; + +import graphql.annotations.annotationTypes.GraphQLField; + +import java.util.List; + +public class AbstractPropertyTypeInput { + +@GraphQLField +public String id; +@GraphQLField +public String name; +@GraphQLField +public int minOccurrences; +@GraphQLField +public int maxOccurrences; +@GraphQLField +public List tags; +@GraphQLField +public List systemTags; +@GraphQLField +public boolean personalData; + +} diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyTypeInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyTypeInput.java new file mode 100644 index 000..3843f5a --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyTypeInput.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * 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/CXSDateProperty
[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
[unomi] 03/15: UNOMI-180 Implement CXS GraphQL API - First implementation of registering event types. Not yet perfect but some parts are working.
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 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 --- .../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..000 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/AbstractPropertyTypeInput.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.unomi.graphql; - -import graphql.annotations.annotationTypes.GraphQLField; - -import java.util.List; - -public class AbstractPropertyTypeInput { - -@GraphQLField -public String id; -@GraphQLField -public String name; -@GraphQLField -public int minOccurrences; -@GraphQLField -public int maxOccurrences; -@GraphQLField -public List tags; -@GraphQLField -public List systemTags; -@GraphQLField -public boolean personalData; - -} 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 @@ packa
[unomi] 12/15: UNOMI-180 Implement CXS GraphQL API - Rename CXS to CDP
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 AuthorDate: Mon Nov 19 18:17:11 2018 +0100 UNOMI-180 Implement CXS GraphQL API - Rename CXS to CDP Signed-off-by: Serge Huber --- 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 @@ 4.0.0 -cxs-graphql-api-impl -Apache Unomi :: GraphQL API :: CXS Implementation -Apache Unomi Context GraphQL API CXS Implementation +cdp-graphql-api-impl +Apache Unomi :: GraphQL API :: CDP Implementation +Apache Unomi Context GraphQL API CDP Implementation bundle 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 getEventTypes(); -CXSProviderManager getCxsProviderManager(); +Map getEventTypes(); +CDPProviderManager getCdpProviderManager(); void updateGraphQLTypes(); -void s
[unomi] 09/15: UNOMI-180 Implement CXS GraphQL API Make sure we use CXS_ prefix everywhere.
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 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 --- .../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.annotation
[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.
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 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 --- 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 000..ac3123d --- /dev/null +++ b/graphql/cxs-impl/pom.xml @@ -0,0 +1,76 @@ + + +http://maven.apache.org/POM/4.0.0"; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> + +org.apache.unomi +unomi-graphql +1.3.0-incubating-SNAPSHOT + +4.0.0 + +cxs-graphql-api-impl +bundle + + + +com.graphql-java +graphql-java-servlet +${graphql.java.servlet.version} +provided + + +com.graphql-java +graphql-java +${graphql.java.version} +provided + + +io.github.graphql-java +graphql-java-annotations +${graphql.java.annotations.version} +provided + + +org.osgi +osgi.enterprise +6.0.0 +provided + + +org.osgi +osgi.core +6.0.0 +provided + + +org.apache.felix +org.apache.felix.scr.ds-annotations +1.2.4 +provided + + +org.slf4j +slf4j-api +1.7.21 +provided + + + + \ No newline at end of file diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java new file mode 100644 index 000..c278678 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEvent.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.unomi.graphql; + +import java.util.LinkedHashMap; +import java.util.Map; + +public class CXSEvent { + +private String id; +private String eventType; +private long timeStamp; +private String subject; +private String object; +private Map properties = new LinkedHashMap<>(); +private CXSGeoPoint 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 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 000..43
[unomi] 13/15: UNOMI-180 Implement CXS GraphQL API - Update version numbers
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 AuthorDate: Wed Nov 21 20:21:37 2018 +0100 UNOMI-180 Implement CXS GraphQL API - Update version numbers Signed-off-by: Serge Huber --- 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 @@ org.apache.unomi unomi-graphql -1.3.0-incubating-SNAPSHOT +1.4.0-incubating-SNAPSHOT 4.0.0 @@ -76,7 +76,7 @@ org.apache.unomi unomi-api -1.3.0-incubating-SNAPSHOT +1.4.0-incubating-SNAPSHOT provided diff --git a/graphql/karaf-feature/pom.xml b/graphql/karaf-feature/pom.xml index 3179638..61aa3a1 100644 --- a/graphql/karaf-feature/pom.xml +++ b/graphql/karaf-feature/pom.xml @@ -21,12 +21,12 @@ org.apache.unomi unomi-graphql -1.3.0-incubating-SNAPSHOT +1.4.0-incubating-SNAPSHOT 4.0.0 feature -cxs-graphql-feature +cdp-graphql-feature Apache Unomi :: GraphQL API :: Karaf Feature Apache Unomi Context GraphQL API Karaf Feature @@ -113,8 +113,8 @@ org.apache.unomi -cxs-graphql-api-impl -1.3.0-incubating-SNAPSHOT +cdp-graphql-api-impl +1.4.0-incubating-SNAPSHOT diff --git a/graphql/pom.xml b/graphql/pom.xml index 25d0e3f..9ab861d 100644 --- a/graphql/pom.xml +++ b/graphql/pom.xml @@ -22,7 +22,7 @@ org.apache.unomi unomi-root -1.3.0-incubating-SNAPSHOT +1.4.0-incubating-SNAPSHOT unomi-graphql
[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)
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 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 --- .../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..000 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSBooleanPropertyType.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.unomi.graphql; - -import graphql.annotations.annotationTypes.GraphQLField; -import graphql.annotations.annotationTypes.GraphQLName; - -@GraphQLName("CXSBooleanPropertyType") -public class CXSBooleanPropertyType extends CXSPropertyType { - -@GraphQLField -public boolean defaultValue; - -} diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDatePropertyType.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDatePropertyType.java deleted file mode 100644 index 362d2bc..000 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDatePropertyType.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for 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.annot
[unomi] 04/15: UNOMI-180 Implement CXS GraphQL API - Event type registration and dynamic schema generation is now mostly working !
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 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 --- .../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 registeredOutputTypes = new TreeMap<>(); private Map registeredInputTypes = new TreeMap<>(); private CXSProviderManager cxsProviderManager; +private GraphQLAnnotationsComponent annotationsComponent; +private ProcessingElementsContainer container; private Map eventTypes = new TreeMap<>(); -public CXSGraphQLProviderImpl() { +public CXSGraphQLProviderImpl(GraphQLAnnotationsComponent annotationsComponent) { +this.annotationsComponent = annotationsComponent; +container = annotationsComponent.createContainer(); updateGraphQLTypes(); } private void updateGraphQLTypes() { -registeredOutputTypes.put(CXSGeoPoint.class.getName(), GraphQLAnnotations.object(CXSGeoPoint.class)); -registeredOutputTypes.put(CXSSetPropertyType.class.getName(), GraphQLAnnotations.object(CXSSetPropertyType.class)); + +registeredOutputTypes.put(CXSGeoPoint.class.getName(), annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSGeoPoint.class, container)); + registeredOutputTypes.put(CXSSetPropertyType.class.getName(),annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSSetPropertyType.class, container)); +registeredOutputTypes.put(CXSEventType.class.getName(), annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(CXSEventType.class, container)); + +registeredInputTypes.put(CXSEventTypeInput.class.getName(), annotationsComponent.getInputTypeProcessor().getInputTypeOrRef(CXSEventTypeInput.class, container)); +registeredInputTypes.put("CXS_EventInput", buildCXSEventInputType()); + registeredOutputTypes.put("CXS_EventProperties", buildCXSEventPropertiesOutputType()); -registeredOutputTypes.put(CXSEventType.class.getName(), GraphQLAnnotations.object(CXSEventType.class)); +/* 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("C
[unomi] 05/15: UNOMI-180 Implement CXS GraphQL API - We now have basic filtering generation for event types working !
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 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 --- .../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 000..f92759e --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSDateFilterInput.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.unomi.graphql; + +import graphql.annotations.annotationTypes.GraphQLField; + +public class CXSDateFilterInput { +@GraphQLField +public long after; +@GraphQLField +public boolean includeAfter; +@GraphQLField +public long before; +@GraphQLField +public boolean includeBefore; +} diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilterInput.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilterInput.java new file mode 100644 index 000..83d23da --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/CXSEventOccurrenceFilterInput.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.unomi.graphql; + +import graphql.annotations.annotationTypes.GraphQLField; + +public class CXSEventOccurrenceFilterInput { + +@GraphQLField +public String eventId; +@GraphQLField +public String beforeTime; +@GraphQLField +public String afterTime; +@GraphQLField +public String betweenTime; +@GraphQLField +public int count; +} 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 000..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 ap
[unomi] 11/15: UNOMI-180 Implement CXS GraphQL API - Modify the type generation to use "Input" suffix for input types instead of a prefix.
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 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 --- 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 @@ 1.7.21 provided + +org.apache.unomi +unomi-api +1.3.0-incubating-SNAPSHOT +provided + \ 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 getEventTypes(); +Map 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.CXSEven
[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
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 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 --- .../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 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 000..3d9c586 --- /dev/null +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/builders/CXSBuildersUtils.java @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.unomi.graphql.builders; + +import graphql.annotations.processor.GraphQLAnnotationsComponent; +import graphql.annotations.processor.ProcessingElementsContainer; +import graphql.schema.GraphQLInputObjectType; +import graphql.schema.GraphQLObjectType; + +public class CXSBuildersUtils { + +public static GraphQLObjectType.Builder getOutputBuilderFromAnnotatedClass( +GraphQLAnnotationsComponent annotationsComponent, +ProcessingElementsContainer container, +String typeName, +Class annotatedClass) { +if (typeName == null) { +typeName = annotatedClass.getName(); +} +return GraphQLObjectType.newObject() +.name(typeName) +.fields(((GraphQLObjectType) annotationsComponent.getOutputTypeProcessor().getOutputTypeOrRef(annotatedClass, container)).getFieldDefinitions()); +} + +public static GraphQLInputObjectType.Builder getInputBuilderFromAnnotatedClass( +GraphQLAnnotationsComponent annotationsComponent, +ProcessingElementsContainer container, +String typeName, +Class annotatedClass) { +if (typeName == null) { +typeName = annotatedClass.getName(); +} +return GraphQLInputObjectType.newInputObject() +.name(typeName) +.fields(((GraphQLInputObjectType) 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.CXS
[unomi] 14/15: UNOMI-180 Implement CXS GraphQL API - Update dependency versions to make the GraphQL framework work again
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 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 --- 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 @@ -com.graphql-java +com.graphql-java-kickstart graphql-java-servlet ${graphql.java.servlet.version} provided diff --git a/graphql/karaf-feature/pom.xml b/graphql/karaf-feature/pom.xml index 61aa3a1..c051b18 100644 --- a/graphql/karaf-feature/pom.xml +++ b/graphql/karaf-feature/pom.xml @@ -35,22 +35,26 @@ com.fasterxml.jackson.core jackson-core -2.8.6 +${jackson.version} +compile com.fasterxml.jackson.core jackson-annotations -2.8.6 +${jackson.version} +compile com.fasterxml.jackson.core jackson-databind -2.8.6 +${jackson.version} +compile com.fasterxml.jackson.datatype jackson-datatype-jdk8 -2.8.4 +${jackson.version} +compile com.google.guava @@ -70,7 +74,7 @@ com.graphql-java java-dataloader -2.0.2 +2.2.0 org.reactivestreams @@ -80,7 +84,7 @@ -com.graphql-java +com.graphql-java-kickstart graphql-java-servlet ${graphql.java.servlet.version} diff --git a/graphql/pom.xml b/graphql/pom.xml index 9ab861d..d879d27 100644 --- a/graphql/pom.xml +++ b/graphql/pom.xml @@ -31,9 +31,10 @@ pom -5.0.1 -8.0 +7.1.0 +11.0 6.1 +2.9.7
[jira] [Commented] (UNOMI-231) Windows compilation issues
[ https://issues.apache.org/jira/browse/UNOMI-231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16838076#comment-16838076 ] Serge Huber commented on UNOMI-231: --- Ok I've committed some fixes to deactivate the Miredot plugin on Windows as well as fix some other issues like the ElasticSearch Maven plugin that was failing on Windows. There are still some issues with the integration tests at this point it seems. I have also contacted Miredot support to see if they can help fix this problem on Windows. > Windows compilation issues > -- > > Key: UNOMI-231 > URL: https://issues.apache.org/jira/browse/UNOMI-231 > Project: Apache Unomi > Issue Type: Bug > Components: core >Affects Versions: 1.3.0-incubating, 1.4.0 >Reporter: Serge Huber >Assignee: Serge Huber >Priority: Major > Fix For: 1.4.0 > > > Currently it is not possible to build Apache Unomi on Windows. > There seem to be multiple issues: > - The miredot plugin (used to generate the REST documentation) seems to > contain a System.exit() call that breaks the build > - The integration tests seem to also not work > A quick solution could be to (temporarily) deactivate the rest generation on > Windows. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[unomi] branch master updated: 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 the
This is an automated email from the ASF dual-hosted git repository. shuber pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/unomi.git The following commit(s) were added to refs/heads/master by this push: new 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 6895351 is described below commit 689535135fecb38b42178f2374b9fb7ad861483f Author: sergehuber AuthorDate: Sun May 12 16:05:28 2019 +0200 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 --- itests/pom.xml | 3 +- .../unomi/metrics/internal/MetricsServiceTest.java | 7 +- .../conditions/PropertyConditionEvaluatorTest.java | 6 +- rest/pom.xml | 333 +++-- 4 files changed, 184 insertions(+), 165 deletions(-) diff --git a/itests/pom.xml b/itests/pom.xml index bd5bbf4..fad2656 100644 --- a/itests/pom.xml +++ b/itests/pom.xml @@ -177,13 +177,14 @@ com.github.alexcojocaru elasticsearch-maven-plugin -5.6 +6.13 contextElasticSearchITests 9500 9400 ${elasticsearch.version} true +120 - - - + +com.qmino +miredot-plugin +2.1.2 + + + +restdoc + + + - -swagger - - + cHJvamVjdHxvcmcuYXBhY2hlLnVub21pLnVub21pLXJlc3R8MjAyMC0wMi0yOHx0cnVlfC0xI01Dd0NGQ01pMDRxTFZ6LzJ4SG82MjAranZITnRLYWovQWhRcG4vS01jdTU2NXpOWkRpUzcwQXMrdC96bVdRPT0= + +Documentation for Apache Unomi's RESTful API ${project.version} + + + ${project.parent.build.directory}/staging/rest-api-doc + + + + + +jax-rs + + src/main/resources/OSGI-INF/blueprint/blueprint.xml + + + + +200 +always +The service call has completed successfully. + + +401 +explicit: com.acme.exceptions.AuthorizationException +The user is not authorized to use this service. + + +412 +put,post +Invalid JSON/XML input. + + +500 +always +The service call has not succeeded. +true + + + + + ../api/src/main/java + + + + + + w
[jira] [Created] (UNOMI-231) Windows compilation issues
Serge Huber created UNOMI-231: - Summary: Windows compilation issues Key: UNOMI-231 URL: https://issues.apache.org/jira/browse/UNOMI-231 Project: Apache Unomi Issue Type: Bug Components: core Affects Versions: 1.3.0-incubating, 1.4.0 Reporter: Serge Huber Assignee: Serge Huber Fix For: 1.4.0 Currently it is not possible to build Apache Unomi on Windows. There seem to be multiple issues: - The miredot plugin (used to generate the REST documentation) seems to contain a System.exit() call that breaks the build - The integration tests seem to also not work A quick solution could be to (temporarily) deactivate the rest generation on Windows. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[unomi] branch master updated: UNOMI-208 Improve documentation - Fix image reference in archived documentation
This is an automated email from the ASF dual-hosted git repository. shuber pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/unomi.git The following commit(s) were added to refs/heads/master by this push: new abe5342 UNOMI-208 Improve documentation - Fix image reference in archived documentation abe5342 is described below commit abe53424da8d3a20cbc103d6ad42aa9ea2be4b62 Author: Serge Huber AuthorDate: Sun May 12 11:34:20 2019 +0200 UNOMI-208 Improve documentation - Fix image reference in archived documentation Signed-off-by: Serge Huber --- manual/src/archives/1.1/asciidoc/getting-started.adoc| 3 ++- manual/src/archives/1.2/asciidoc/samples/twitter-sample.adoc | 3 ++- manual/src/archives/1.3/asciidoc/samples/twitter-sample.adoc | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/manual/src/archives/1.1/asciidoc/getting-started.adoc b/manual/src/archives/1.1/asciidoc/getting-started.adoc index 112d07b..4ad0942 100644 --- a/manual/src/archives/1.1/asciidoc/getting-started.adoc +++ b/manual/src/archives/1.1/asciidoc/getting-started.adoc @@ -458,4 +458,5 @@ We have seen a simple example how to interact with Unomi using a combination of === Annex Here is an overview of how Unomi processes incoming requests to the `ContextServlet`. -image:../../images/unomi-request.png[Unomi request overview] \ No newline at end of file + +image::unomi-request.png[Unomi request overview] \ No newline at end of file diff --git a/manual/src/archives/1.2/asciidoc/samples/twitter-sample.adoc b/manual/src/archives/1.2/asciidoc/samples/twitter-sample.adoc index 23de08c..dc37f41 100644 --- a/manual/src/archives/1.2/asciidoc/samples/twitter-sample.adoc +++ b/manual/src/archives/1.2/asciidoc/samples/twitter-sample.adoc @@ -430,4 +430,5 @@ We have seen a simple example how to interact with Unomi using a combination of === Annex Here is an overview of how Unomi processes incoming requests to the `ContextServlet`. -image:../../images/unomi-request.png[Unomi request overview] \ No newline at end of file + +image::unomi-request.png[Unomi request overview] \ No newline at end of file diff --git a/manual/src/archives/1.3/asciidoc/samples/twitter-sample.adoc b/manual/src/archives/1.3/asciidoc/samples/twitter-sample.adoc index a74f81c..0590606 100644 --- a/manual/src/archives/1.3/asciidoc/samples/twitter-sample.adoc +++ b/manual/src/archives/1.3/asciidoc/samples/twitter-sample.adoc @@ -429,4 +429,5 @@ We have seen a simple example how to interact with Unomi using a combination of === Annex Here is an overview of how Unomi processes incoming requests to the `ContextServlet`. -image: images/unomi-request.png[Unomi request overview] \ No newline at end of file + +image::unomi-request.png[Unomi request overview] \ No newline at end of file
[unomi] branch master updated: UNOMI-208 Improve documentation - Fix image reference for latest documentation, probably still have to fix it for archives
This is an automated email from the ASF dual-hosted git repository. shuber pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/unomi.git The following commit(s) were added to refs/heads/master by this push: new 41206f6 UNOMI-208 Improve documentation - Fix image reference for latest documentation, probably still have to fix it for archives 41206f6 is described below commit 41206f68d92db9913c2fc727e3335da01baac768 Author: Serge Huber AuthorDate: Sun May 12 10:28:37 2019 +0200 UNOMI-208 Improve documentation - Fix image reference for latest documentation, probably still have to fix it for archives Signed-off-by: Serge Huber --- manual/src/main/asciidoc/concepts.adoc | 8 +++- manual/src/main/asciidoc/samples/twitter-sample.adoc | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/manual/src/main/asciidoc/concepts.adoc b/manual/src/main/asciidoc/concepts.adoc index 0849fcc..6fc8525 100644 --- a/manual/src/main/asciidoc/concepts.adoc +++ b/manual/src/main/asciidoc/concepts.adoc @@ -122,4 +122,10 @@ It is interesting to note that there is not necessarily a one to one mapping bet === Sessions -A session represents a time-bounded interaction between a user (via their associated profile) and a Unomi-enabled application. A session represents the sequence of actions the user performed during its duration. For this reason, events are associated with the session during which they occurred. In the context of web applications, sessions are usually linked to HTTP sessions. \ No newline at end of file +A session represents a time-bounded interaction between a user (via their associated profile) and a Unomi-enabled application. A session represents the sequence of actions the user performed during its duration. For this reason, events are associated with the session during which they occurred. In the context of web applications, sessions are usually linked to HTTP sessions. + +=== Request flow + +Here is an overview of how Unomi processes incoming requests to the `ContextServlet`. + +image::unomi-request.png[Unomi request overview] \ No newline at end of file diff --git a/manual/src/main/asciidoc/samples/twitter-sample.adoc b/manual/src/main/asciidoc/samples/twitter-sample.adoc index a74f81c..0590606 100644 --- a/manual/src/main/asciidoc/samples/twitter-sample.adoc +++ b/manual/src/main/asciidoc/samples/twitter-sample.adoc @@ -429,4 +429,5 @@ We have seen a simple example how to interact with Unomi using a combination of === Annex Here is an overview of how Unomi processes incoming requests to the `ContextServlet`. -image: images/unomi-request.png[Unomi request overview] \ No newline at end of file + +image::unomi-request.png[Unomi request overview] \ No newline at end of file
[unomi] branch master updated: 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
This is an automated email from the ASF dual-hosted git repository. shuber pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/unomi.git The following commit(s) were added to refs/heads/master by this push: new 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 cdfbfb6 is described below commit cdfbfb6b926fc4300ed56c1a02832141d0db4aec Author: Serge Huber AuthorDate: Sun May 12 10:12:36 2019 +0200 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 Signed-off-by: Serge Huber --- manual/src/main/asciidoc/5-min-quickstart.adoc | 2 +- manual/src/main/asciidoc/consent-api.adoc | 73 +- manual/src/main/asciidoc/getting-started.adoc | 75 +- manual/src/main/asciidoc/index.adoc| 22 +-- manual/src/main/asciidoc/patches.adoc | 2 +- manual/src/main/asciidoc/request-examples.adoc | 158 + manual/src/main/asciidoc/useful-unomi-urls.adoc| 2 +- .../{installing-tracker.adoc => web-tracker.adoc} | 10 +- 8 files changed, 246 insertions(+), 98 deletions(-) diff --git a/manual/src/main/asciidoc/5-min-quickstart.adoc b/manual/src/main/asciidoc/5-min-quickstart.adoc index 5bb2e20..9a8b7f9 100644 --- a/manual/src/main/asciidoc/5-min-quickstart.adoc +++ b/manual/src/main/asciidoc/5-min-quickstart.adoc @@ -11,7 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // - Five Minutes QuickStart +=== Five Minutes QuickStart 1) Install JDK 8 (http://www.oracle.com/technetwork/java/javase/downloads/index.html) and make sure you set the JAVA_HOME variable https://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/ diff --git a/manual/src/main/asciidoc/consent-api.adoc b/manual/src/main/asciidoc/consent-api.adoc index fad664f..fef63ec 100644 --- a/manual/src/main/asciidoc/consent-api.adoc +++ b/manual/src/main/asciidoc/consent-api.adoc @@ -13,7 +13,7 @@ // === Consent API -Starting with Apache Unomi 1.3 (still in development), a new API for consent management is now available. This API +Starting with Apache Unomi 1.3, a new API for consent management is now available. This API is designed to be able to store/retrieve/update visitor consents in order to comply with new privacy regulations such as the https://en.wikipedia.org/wiki/General_Data_Protection_Regulation[GDPR]. @@ -28,20 +28,45 @@ definitions, it only stores/retrieves consents for each profile based on this ty * a status date (the date at which the status was updated) * a revocation date, in order to comply with GDPR this is usually set at two years -Here is an example of a Profile with a consent attached to it: +Consents are stored as a sub-structure inside a profile. To retrieve the consents of a profile +you can simply retrieve a profile with the following request: [source] +curl -X POST http://localhost:8181/context.json?sessionId=1234 \ +-H "Content-Type: application/json" \ +-d @- <<'EOF' { -"profileId": "8cbe380f-57bb-419d-97bf-24bf30178550", -"sessionId": "0d755f4e-154a-45c8-9169-e852e1d706d9", +"source": { +"itemId":"homepage", +"itemType":"page", +"scope":"example" +} +} +EOF + + +Here is an example of a response with a Profile with a consent attached to it: + +[source] + +{ +"profileId": "18afb5e3-48cf-4f8b-96c4-854cfaadf889", +"sessionId": "1234", +"profileProperties": null, +"sessionProperties": null, +"profileSegments": null, +"filteringResults": null, +"personalizations": null, +"trackedConditions": [], +"anonymousBrowsing": false, "consents": { "example/newsletter": { "scope": "example", "typeIdentifier": "newsletter", "status": "GRANTED", -"statusDate": "2018-05-22T09:44:33Z", -"revokeDate": "2020-05-21T09:44:33Z" +"statusDate": "2018-05-22T09:27:09Z", +"revokeDate": "2020-05-21T09:27:09Z" } } } @@ -99,7 +124,41 @@ You could send it using the following curl request: [source] -curl -H "Content-Type: application/json" -X POST -d '{"source":{"itemId":"homepage","itemType":"page","scope":"example"},"events":[{"scope":"example","eventType":"modifyConsent","source":{"itemT