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 df454f45db1b87d6d969bcc5ba7072fcf2de48bf Author: Serge Huber <shu...@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 <shu...@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; }