Interface ApproximateMarkdownServicePlugin

    • Method Detail

      • getImageUrl

        @Nullable
        default String getImageUrl​(@Nullable
                                   org.apache.sling.api.resource.Resource imageResource)
        Retrieves the imageURL in a way useable for ChatGPT - usually data:image/jpeg;base64,{base64_image} If the plugin cannot handle this resource, it should return null.
      • resourceRendersAsComponentMatching

        default boolean resourceRendersAsComponentMatching​(@Nonnull
                                                           org.apache.sling.api.resource.Resource resource,
                                                           @Nonnull
                                                           Pattern pattern)
        Returns true when the sling:resourceType or one of the sling:resourceSuperType of the sling:resourceType match the pattern. Useable to check whether a resource is rendered with a derivation of a certain component.
      • getMasterLinks

        @Nonnull
        default Collection<? extends ApproximateMarkdownService.Link> getMasterLinks​(org.apache.sling.api.resource.Resource resource)
        If applicable: this returns links to the master from which the current page was created - e.g. an AEM live copy.