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 Type
    Method
    Description
    default @NotNull String
    Returns the string representation of data type of FragmentData of the element.
    default @NotNull String
    Returns the type of the resource for which the export is performed.
    default @Nullable String
    Returns the value of a multiline text element converted to HTML.
    default @NotNull String
    Returns the technical name of the element.
    default @Nullable String
    Returns the title of the element.
    default @Nullable Object
    Returns the value of the element.
    default <T> T
    getValue(Class<T> var1)
    Returns the value of the element.
    default boolean
    Returns true if this is a multiline text element, i.e.
    default boolean
    Returns true if this is a multi-valued element value.
  • Method Details

    • 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:
    • 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:
    • getDataType

      @NotNull default @NotNull String getDataType()
      Returns the string representation of data type of FragmentData of the element. For the possible values see BasicDataType. 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

      @Nullable default @Nullable Object getValue()
      Returns the value of the element. The returned object's type would correspond to the types as specified in BasicDataType 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:
    • 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 in BasicDataType or 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

      @NotNull default @NotNull String getExportedType()
      Returns the type of the resource for which the export is performed.
      Specified by:
      getExportedType in interface ComponentExporter
      Returns:
      the type of the component
      Since:
      com.adobe.cq.wcm.core.components.models.contentfragment 1.0.0
    • isMultiLine

      default boolean isMultiLine()
      Returns true 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()
      Returns true 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 uses ContentTypeConverter.convertToHTML(String, String) to convert the value to html. Returns null 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: