Class ProductTeaserImpl

  • All Implemented Interfaces:
    ProductTeaser, com.adobe.cq.export.json.ComponentExporter, com.adobe.cq.wcm.core.components.models.Component

    @Model(adaptables=org.apache.sling.api.SlingHttpServletRequest.class,
           adapters={ProductTeaser.class,com.adobe.cq.export.json.ComponentExporter.class},
           resourceType="core/cif/components/commerce/productteaser/v1/productteaser")
    public class ProductTeaserImpl
    extends DataLayerComponent
    implements ProductTeaser
    • Constructor Detail

      • ProductTeaserImpl

        public ProductTeaserImpl()
    • Method Detail

      • getName

        public String getName()
        Description copied from interface: ProductTeaser
        Returns name of the configured Product for this ProductTeaser
        Specified by:
        getName in interface ProductTeaser
        Returns:
        name of the configured Product for this Teaser of null
      • getSku

        public String getSku()
        Description copied from interface: ProductTeaser
        Returns the SKU of the product displayed by this ProductTeaser
        Specified by:
        getSku in interface ProductTeaser
        Returns:
        a String value representing the SKU
      • getCallToAction

        public String getCallToAction()
        Description copied from interface: ProductTeaser
        Returns the "call to action" configured for this teaser.
        Specified by:
        getCallToAction in interface ProductTeaser
        Returns:
        the value of the "call to action" option. This can be "add-to-cart" or "details". If no CTA is configured then this methods returns null
      • getCallToActionText

        public String getCallToActionText()
        Description copied from interface: ProductTeaser
        Returns the "call to action text" configured for this teaser.
        Specified by:
        getCallToActionText in interface ProductTeaser
        Returns:
        the value of the "call to action text" option. If no CTA text is configured then this methods returns null
      • getUrl

        public String getUrl()
        Description copied from interface: ProductTeaser
        Returns the url of the product page for this ProductTeaser
        Specified by:
        getUrl in interface ProductTeaser
        Returns:
        the url of the product page of the configured product or null
      • getImage

        public String getImage()
        Description copied from interface: ProductTeaser
        Returns url of swatch image of the product for display for this ProductTeaser
        Specified by:
        getImage in interface ProductTeaser
        Returns:
        url of the swatch image for the product or null
      • getExportedType

        public String getExportedType()
        Specified by:
        getExportedType in interface com.adobe.cq.wcm.core.components.models.Component
        Specified by:
        getExportedType in interface com.adobe.cq.export.json.ComponentExporter
      • getComponentData

        protected com.adobe.cq.wcm.core.components.models.datalayer.ComponentData getComponentData()
        Overrides:
        getComponentData in class DataLayerComponent