Interface ComponentExporter

All Known Subinterfaces:
Accordion, Breadcrumb, Button, Button, Carousel, Component, Container, Container, ContainerExporter, ContentFragment, ContentFragmentList, DAMContentFragment, DAMContentFragment.DAMContentElement, Download, Embed, ExperienceFragment, Field, HierarchyNodeExporter, Image, LanguageNavigation, LanguageNavigationItem, LayoutContainer, List, ListItem, Navigation, NavigationItem, Options, Page, Page, PanelContainer, PdfViewer, ProgressBar, ResponsiveColumnExporter, ResponsiveGridExporter, Search, Separator, SocialMediaHelper, TableOfContents, Tabs, Teaser, Text, Text, Title
All Known Implementing Classes:
AbstractComponentImpl, ResponsiveColumn, ResponsiveGrid

@ConsumerType public interface ComponentExporter
Defines the JSON export of a component.

This interface is aimed at being implemented by Sling Model classes that should provide a JSON export for their corresponding component.

NOTE: Getter methods' names are all prefixed to avoid name conflicts with methods from the implementation class.

  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the type of the resource for which the export is performed.
  • Method Details

    • getExportedType

      @Nonnull String getExportedType()

      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.

      Returns:
      the type of the component