Interface OEmbedClient
-
public interface OEmbedClientA 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.StringgetProvider(java.lang.String url)Gets a suitable oEmbed provider for the given URL.OEmbedResponsegetResponse(java.lang.String url)Gets the embedding information from the oEmbed provider.booleanisUnsafeContext(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.
nullif 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,
nullotherwise - 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:
trueif the provider response HTML is allowed to be displayed in an unsafe context,falseotherwise- Since:
- com.adobe.cq.wcm.core.components.services.embed 1.0.0
-
-