Interface OEmbedClient


public interface OEmbedClient
A service that allows finding providers and embedding information for URLs.
Since:
com.adobe.cq.wcm.core.components.services.embed 1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets a suitable oEmbed provider for the given URL.
    Gets the embedding information from the oEmbed provider.
    boolean
    Determines whether the provider response HTML is allowed to be displayed in an unsafe context.
  • Method Details

    • getProvider

      String getProvider(String url)
      Gets a suitable oEmbed provider for the given URL.
      Parameters:
      url - The URL
      Returns:
      The name of the oEmbed provider, as defined in configuration. null if no provider is found
      Since:
      com.adobe.cq.wcm.core.components.services.embed 1.0.0
    • getResponse

      OEmbedResponse getResponse(String url)
      Gets the embedding information from the oEmbed provider.
      Parameters:
      url - The URL to retrieve embedding information for
      Returns:
      The oEmbed response, null otherwise
      Since:
      com.adobe.cq.wcm.core.components.services.embed 1.0.0
    • isUnsafeContext

      boolean isUnsafeContext(String url)
      Determines whether the provider response HTML is allowed to be displayed in an unsafe context.
      Parameters:
      url - The URL to retrieve the unsafe context flag for
      Returns:
      true if the provider response HTML is allowed to be displayed in an unsafe context, false otherwise
      Since:
      com.adobe.cq.wcm.core.components.services.embed 1.0.0