You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2020/06/09 12:50:05 UTC

[sling-org-apache-sling-graphql-core] branch master updated: Fix annotations

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

bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-graphql-core.git


The following commit(s) were added to refs/heads/master by this push:
     new f5a33c2  Fix annotations
f5a33c2 is described below

commit f5a33c291994de491705eeac08a980f9f20c3c31
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Tue Jun 9 14:49:51 2020 +0200

    Fix annotations
---
 .../java/org/apache/sling/graphql/api/SchemaProvider.java   |  3 +--
 .../java/org/apache/sling/graphql/api/SlingDataFetcher.java | 13 ++++++-------
 .../sling/graphql/api/SlingDataFetcherEnvironment.java      |  4 +++-
 .../graphql/core/scripting/GraphQLScriptEngineFactory.java  |  1 -
 4 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/main/java/org/apache/sling/graphql/api/SchemaProvider.java b/src/main/java/org/apache/sling/graphql/api/SchemaProvider.java
index 0e6772f..e6feb41 100644
--- a/src/main/java/org/apache/sling/graphql/api/SchemaProvider.java
+++ b/src/main/java/org/apache/sling/graphql/api/SchemaProvider.java
@@ -24,8 +24,7 @@ import java.io.IOException;
 import org.apache.sling.api.resource.Resource;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
-
-import aQute.bnd.annotation.ProviderType;
+import org.osgi.annotation.versioning.ProviderType;
 
 @ProviderType
 public interface SchemaProvider {
diff --git a/src/main/java/org/apache/sling/graphql/api/SlingDataFetcher.java b/src/main/java/org/apache/sling/graphql/api/SlingDataFetcher.java
index 5dd7ce5..5bdc95b 100644
--- a/src/main/java/org/apache/sling/graphql/api/SlingDataFetcher.java
+++ b/src/main/java/org/apache/sling/graphql/api/SlingDataFetcher.java
@@ -19,14 +19,13 @@
 
 package org.apache.sling.graphql.api;
 
-import aQute.bnd.annotation.ConsumerType;
+import org.osgi.annotation.versioning.ConsumerType;
 
-/** Retrieves data for a given GraphQL field. Services
- *  must be registered with a NAME property with a unique
- *  value that's matched with the corresponding @directive
- *  in the GraphQL Schema. The name must match the 
- *  {#link GraphQLResourceQuery.FETCHER_NAME_PATTERN} regular
- *  expression.
+/**
+ * Retrieves data for a given GraphQL field. Services must be registered with a
+ * NAME property with a unique value that's matched with the
+ * corresponding @directive in the GraphQL Schema. The name must match the
+ * {#link GraphQLResourceQuery.FETCHER_NAME_PATTERN} regular expression.
  */
 @ConsumerType
 public interface SlingDataFetcher<T> {
diff --git a/src/main/java/org/apache/sling/graphql/api/SlingDataFetcherEnvironment.java b/src/main/java/org/apache/sling/graphql/api/SlingDataFetcherEnvironment.java
index 159f45c..4088a79 100644
--- a/src/main/java/org/apache/sling/graphql/api/SlingDataFetcherEnvironment.java
+++ b/src/main/java/org/apache/sling/graphql/api/SlingDataFetcherEnvironment.java
@@ -20,11 +20,13 @@
 package org.apache.sling.graphql.api;
 
 import java.util.Map;
-
 import org.apache.sling.api.resource.Resource;
+import org.osgi.annotation.versioning.ProviderType;
 
 /** Provides contextual information to the {#link SlingDataFetcher} */
 @SuppressWarnings("TypeParameterUnusedInFormals")
+
+@ProviderType
 public interface SlingDataFetcherEnvironment {
     /** The parent object of the field that's being retrieved */
     Object getParentObject();
diff --git a/src/main/java/org/apache/sling/graphql/core/scripting/GraphQLScriptEngineFactory.java b/src/main/java/org/apache/sling/graphql/core/scripting/GraphQLScriptEngineFactory.java
index 503937d..bad7587 100644
--- a/src/main/java/org/apache/sling/graphql/core/scripting/GraphQLScriptEngineFactory.java
+++ b/src/main/java/org/apache/sling/graphql/core/scripting/GraphQLScriptEngineFactory.java
@@ -34,7 +34,6 @@ import org.osgi.service.metatype.annotations.Designate;
 
 @Component(
     service = ScriptEngineFactory.class,
-    immediate = true,
     property = {
         Constants.SERVICE_DESCRIPTION + "=Apache Sling Scripting GraphQL ScriptEngineFactory",
         Constants.SERVICE_VENDOR + "=The Apache Software Foundation"