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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getProvider​(java.lang.String url)
      Gets a suitable oEmbed provider for the given URL.
      OEmbedResponse getResponse​(java.lang.String url)
      Gets the embedding information from the oEmbed provider.
      boolean isUnsafeContext​(java.lang.String url)
      Determines whether the provider response HTML is allowed to be displayed in an unsafe context.
    • Method Detail

      • getProvider

        java.lang.String getProvider​(java.lang.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​(java.lang.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​(java.lang.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