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 StringgetDataType()Returns the string representation of data type ofFragmentDataof the element.default @NotNull StringgetExportedType()Returns the type of the resource for which the export is performed.default @Nullable StringgetHtml()Returns the value of a multiline text element converted to HTML.default @NotNull StringgetName()Returns the technical name of the element.default @Nullable StringgetTitle()Returns the title of the element.default @Nullable ObjectgetValue()Returns the value of the element.default <T> TgetValue(Class<T> var1)Returns the value of the element.default booleanisMultiLine()Returnstrueif this is a multiline text element, i.e.default booleanisMultiValue()Returnstrueif 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 ofFragmentDataof 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 inBasicDataTypeor 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 inBasicDataTypeor 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:
getExportedTypein interfaceComponentExporter- Returns:
- the type of the component
- Since:
- com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
-
isMultiLine
default boolean isMultiLine()
Returnstrueif this is a multiline text element, i.e. a textual element containing multiple lines (paragraphs).- Returns:
trueif the element is a multiline text element,falseotherwise- Since:
- com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
-
isMultiValue
default boolean isMultiValue()
Returnstrueif this is a multi-valued element value.- Returns:
trueif the element is multi-valued,falseotherwise- 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. Returnsnullfor non-multiline-text elements.- Returns:
- the value of the element converted to HTML or
nullfor non-multiline-text elements - Since:
- com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
- See Also:
isMultiLine(),ContentTypeConverter.convertToHTML(String, String)
-
-