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 TypeMethodDescriptiongetProvider(String url) Gets a suitable oEmbed provider for the given URL.getResponse(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 Details
-
getProvider
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
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
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
-