Interface Embed
-
- All Superinterfaces:
Component
,ComponentExporter
@ConsumerType public interface Embed extends Component
Defines theEmbed
Sling Model used for the/apps/core/wcm/components/embed
component.- Since:
- com.adobe.cq.wcm.core.components.models 12.10.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Embed.Type
Enumeration of the supported embed input types.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PN_DESIGN_ALLOWED_EMBEDDABLES
Name of the configuration policy property that defines the embeddables that are allowed to be selected by an author.static java.lang.String
PN_DESIGN_EMBEDDABLES_DISABLED
Name of the configuration policy property that indicates whether the embeddable input type is disabled.static java.lang.String
PN_DESIGN_HTML_DISABLED
Name of the configuration policy property that indicates whether the html input type is disabled.static java.lang.String
PN_DESIGN_URL_DISABLED
Name of the configuration policy property that indicates whether the url input type is disabled.static java.lang.String
PN_EMBEDDABLE_RESOURCE_TYPE
Name of the resource property that defines the resource type of an embeddable.static java.lang.String
PN_HTML
Name of the resource property that defines an embeddable HTML snippet.static java.lang.String
PN_TYPE
Name of the resource property that defines the embed inputEmbed.Type
.static java.lang.String
PN_URL
Name of the resource property that defines the URL of an embeddable item.static java.lang.String
RT_EMBEDDABLE_V1
Resource type of an embeddable.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default @Nullable java.lang.String
getEmbeddableResourceType()
Returns the resource type of the embeddable.default @NotNull java.lang.String
getExportedType()
Returns the type of the resource for which the export is performed.default @Nullable java.lang.String
getHtml()
Returns an embeddable HTML snippet.default UrlProcessor.Result
getResult()
Returns the result from the processor that can process the given URL.default @Nullable Embed.Type
getType()
Returns the embed inputEmbed.Type
.default @Nullable java.lang.String
getUrl()
Returns the URL of an embeddable item.
-
-
-
Field Detail
-
PN_DESIGN_URL_DISABLED
static final java.lang.String PN_DESIGN_URL_DISABLED
Name of the configuration policy property that indicates whether the url input type is disabled.- Since:
- com.adobe.cq.wcm.core.components.models 12.10.0
- See Also:
- Constant Field Values
-
PN_DESIGN_EMBEDDABLES_DISABLED
static final java.lang.String PN_DESIGN_EMBEDDABLES_DISABLED
Name of the configuration policy property that indicates whether the embeddable input type is disabled.- Since:
- com.adobe.cq.wcm.core.components.models 12.10.0
- See Also:
- Constant Field Values
-
PN_DESIGN_HTML_DISABLED
static final java.lang.String PN_DESIGN_HTML_DISABLED
Name of the configuration policy property that indicates whether the html input type is disabled.- Since:
- com.adobe.cq.wcm.core.components.models 12.10.0
- See Also:
- Constant Field Values
-
PN_DESIGN_ALLOWED_EMBEDDABLES
static final java.lang.String PN_DESIGN_ALLOWED_EMBEDDABLES
Name of the configuration policy property that defines the embeddables that are allowed to be selected by an author.- Since:
- com.adobe.cq.wcm.core.components.models 12.10.0
- See Also:
- Constant Field Values
-
PN_TYPE
static final java.lang.String PN_TYPE
Name of the resource property that defines the embed inputEmbed.Type
.- Since:
- com.adobe.cq.wcm.core.components.models 12.10.0
- See Also:
- Constant Field Values
-
PN_URL
static final java.lang.String PN_URL
Name of the resource property that defines the URL of an embeddable item.- Since:
- com.adobe.cq.wcm.core.components.models 12.10.0
- See Also:
- Constant Field Values
-
PN_HTML
static final java.lang.String PN_HTML
Name of the resource property that defines an embeddable HTML snippet.- Since:
- com.adobe.cq.wcm.core.components.models 12.10.0
- See Also:
- Constant Field Values
-
PN_EMBEDDABLE_RESOURCE_TYPE
static final java.lang.String PN_EMBEDDABLE_RESOURCE_TYPE
Name of the resource property that defines the resource type of an embeddable.- Since:
- com.adobe.cq.wcm.core.components.models 12.10.0
- See Also:
- Constant Field Values
-
RT_EMBEDDABLE_V1
static final java.lang.String RT_EMBEDDABLE_V1
Resource type of an embeddable.- Since:
- com.adobe.cq.wcm.core.components.models 12.10.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
@Nullable default @Nullable Embed.Type getType()
Returns the embed inputEmbed.Type
.- Returns:
- the embed input
Embed.Type
, ornull
if no type is found - Since:
- com.adobe.cq.wcm.core.components.models 12.10.0
-
getUrl
@Nullable default @Nullable java.lang.String getUrl()
Returns the URL of an embeddable item.- Returns:
- The URL of the embeddable item, if type is
Embed.Type.URL
and the url type is not disabled via policy configuration,null
otherwise - Since:
- com.adobe.cq.wcm.core.components.models 12.10.0
-
getResult
@Nullable default UrlProcessor.Result getResult()
Returns the result from the processor that can process the given URL.- Returns:
- The result from the processor that can process the given URL,
null
if processing is not possible - Since:
- com.adobe.cq.wcm.core.components.models 12.10.0
-
getEmbeddableResourceType
@Nullable default @Nullable java.lang.String getEmbeddableResourceType()
Returns the resource type of the embeddable.- Returns:
- The resource type of the embeddable, if type is
Embed.Type.EMBEDDABLE
and the embeddable type is not disabled via policy configuration,null
otherwise - Since:
- com.adobe.cq.wcm.core.components.models 12.10.0
-
getHtml
@Nullable default @Nullable java.lang.String getHtml()
Returns an embeddable HTML snippet.- Returns:
- An embeddable HTML
String
, if type isEmbed.Type.HTML
and the html type is not disabled via policy configuration,null
otherwise - Since:
- com.adobe.cq.wcm.core.components.models 12.10.0
-
getExportedType
@NotNull default @NotNull java.lang.String getExportedType()
Description copied from interface:ComponentExporter
Returns the type of the resource for which the export is performed.
NOTE: methods whose JSON serialization would lead to the same JSON property name (":type") will not be serialized.
- Specified by:
getExportedType
in interfaceComponent
- Specified by:
getExportedType
in interfaceComponentExporter
- Returns:
- the type of the component
- Since:
- com.adobe.cq.wcm.core.components.models 12.10.0
- See Also:
ComponentExporter.getExportedType()
-
-