Interface DAMContentFragment.DAMContentElement
-
- All Superinterfaces:
ComponentExporter
- Enclosing interface:
- DAMContentFragment
@ConsumerType public static interface DAMContentFragment.DAMContentElement extends ComponentExporter
Represents a content element of a content fragment.- Since:
- com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default @NotNull String
getDataType()
Returns the string representation of data type ofFragmentData
of the element.default @NotNull String
getExportedType()
Returns the type of the resource for which the export is performed.default @Nullable String
getHtml()
Returns the value of a multiline text element converted to HTML.default @NotNull String
getName()
Returns the technical name of the element.default @Nullable String
getTitle()
Returns the title of the element.default @Nullable Object
getValue()
Returns the value of the element.default <T> T
getValue(Class<T> var1)
Returns the value of the element.default boolean
isMultiLine()
Returnstrue
if this is a multiline text element, i.e.default boolean
isMultiValue()
Returnstrue
if this is a multi-valued element value.
-
-
-
Method Detail
-
getName
@NotNull default @NotNull String getName()
Returns the technical name of the element.- Returns:
- the technical name of the element
- Since:
- com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
- See Also:
ContentElement.getName()
-
getTitle
@Nullable default @Nullable String getTitle()
Returns the title of the element.- Returns:
- the title of the element
- Since:
- com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
- See Also:
ContentElement.getTitle()
-
getDataType
@NotNull default @NotNull String getDataType()
Returns the string representation of data type ofFragmentData
of the element. For the possible values seeBasicDataType
. Note that this doesn't contain information about the multivalued characteristic of element. Eg. even if the actual value is of type String [], the data type returned would be String.- Returns:
- the data type string
- Since:
- com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
- See Also:
FragmentData.getDataType()
-
getValue
@Nullable default @Nullable Object getValue()
Returns the value of the element. The returned object's type would correspond to the types as specified inBasicDataType
or an array of those types.- Returns:
- the value of the element
- Since:
- com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
- See Also:
FragmentData.getValue()
-
getValue
@Nullable default <T> T getValue(Class<T> var1)
Returns the value of the element. The returned object's type would correspond to the types as specified inBasicDataType
or an array of those types.- Returns:
- the value of the element
- Since:
- com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
- See Also:
FragmentData.getValue()
-
getExportedType
@NotNull default @NotNull String getExportedType()
Returns the type of the resource for which the export is performed.- Specified by:
getExportedType
in interfaceComponentExporter
- Returns:
- the type of the component
- Since:
- com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
-
isMultiLine
default boolean isMultiLine()
Returnstrue
if this is a multiline text element, i.e. a textual element containing multiple lines (paragraphs).- Returns:
true
if the element is a multiline text element,false
otherwise- Since:
- com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
-
isMultiValue
default boolean isMultiValue()
Returnstrue
if this is a multi-valued element value.- Returns:
true
if the element is multi-valued,false
otherwise- Since:
- com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
-
getHtml
@Nullable default @Nullable String getHtml()
Returns the value of a multiline text element converted to HTML. It usesContentTypeConverter.convertToHTML(String, String)
to convert the value to html. Returnsnull
for non-multiline-text elements.- Returns:
- the value of the element converted to HTML or
null
for non-multiline-text elements - Since:
- com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
- See Also:
isMultiLine()
,ContentTypeConverter.convertToHTML(String, String)
-
-