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
Modifier and TypeMethodDescriptiondefault @NotNull StringReturns the string representation of data type ofFragmentDataof the element.default @NotNull StringReturns 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> TReturns the value of the element.default booleanReturnstrueif this is a multiline text element, i.e.default booleanReturnstrueif this is a multi-valued element value.
-
Method Details
-
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:
-
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:
-
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:
-
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:
-
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.- Type Parameters:
T- type of the element- Parameters:
var1- element object- Returns:
- the value of the element
- Since:
- com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
- See Also:
-
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
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:
-