Class SlingDataFetcherSelector


  • public class SlingDataFetcherSelector
    extends Object
    Selects a SlingDataFetcher used to retrieve data, based on a name specified by a GraphQL schema directive.
    • Field Detail

      • RESERVED_NAME_PREFIX

        public static final String RESERVED_NAME_PREFIX
        Fetchers which have a name starting with this prefix must be under the {#link RESERVED_PACKAGE_PREFIX} package.
        See Also:
        Constant Field Values
      • RESERVED_PACKAGE_PREFIX

        public static final String RESERVED_PACKAGE_PREFIX
        Package name prefix for fetchers which have names starting with the {#link RESERVED_NAME_PREFIX}.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SlingDataFetcherSelector

        public SlingDataFetcherSelector()
    • Method Detail

      • activate

        public void activate​(org.osgi.framework.BundleContext ctx)
      • getSlingFetcher

        @Nullable
        public @Nullable SlingDataFetcher<Object> getSlingFetcher​(@NotNull
                                                                  @NotNull String name)
                                                           throws IOException
        Returns:
        a SlingDataFetcher, or null if none available. First tries to get an OSGi SlingDataFetcher service, and if not found tries to find a scripted SlingDataFetcher.
        Throws:
        IOException