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 StringgetProvider(String url)Gets a suitable oEmbed provider for the given URL.OEmbedResponsegetResponse(String url)Gets the embedding information from the oEmbed provider.booleanisUnsafeContext(String url)Determines whether the provider response HTML is allowed to be displayed in an unsafe context.
-
-
-
Method Detail
-
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.
nullif 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,
nullotherwise - 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:
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
-
-