Interface SocialMediaHelper

  • All Superinterfaces:
    Component, ComponentExporter

    @ConsumerType
    public interface SocialMediaHelper
    extends Component
    Defines the Sling Model for the /apps/core/wcm/components/sharing component.
    Since:
    com.adobe.cq.wcm.core.components.models 11.0.0
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default String getFacebookAppId()
      Returns the value of the Facebook App ID if specified, null otherwise.
      default Map<String,​String> getMetadata()
      Returns the social media metadata for the current page.
      default boolean hasFacebookSharing()
      Returns true if Facebook sharing is enabled in page configuration and the page contains the sharing component, false otherwise.
      default boolean hasPinterestSharing()
      Returns true if Pinterest sharing is enabled in page configuration and the page contains the sharing component, false otherwise
      default boolean isFacebookEnabled()
      Returns true if Facebook sharing is enabled in page configuration, false otherwise.
      default boolean isPinterestEnabled()
      Returns true if Pinterest sharing is enabled in page configuration, false otherwise.
      default boolean isSocialMediaEnabled()
      Returns true if a supported social media sharing is enabled in page configuration, false otherwise.
    • Field Detail

      • PN_SOCIAL_MEDIA

        static final String PN_SOCIAL_MEDIA
        Name of the resource property that will indicate which social networks are supported for social sharing.
        Since:
        com.adobe.cq.wcm.core.components.models 11.1.0
        See Also:
        PV_FACEBOOK, PV_PINTEREST, Constant Field Values
      • PN_VARIANT_PATH

        static final String PN_VARIANT_PATH
        Name of the resource property that will indicate which page variant has been used for social sharing.
        Since:
        com.adobe.cq.wcm.core.components.models 11.1.0
        See Also:
        Constant Field Values
      • PN_FACEBOOK_APP_ID

        static final String PN_FACEBOOK_APP_ID
        Name of the property that will return the Facebook App ID.
        Since:
        com.adobe.cq.wcm.core.components.models 11.1.0
        See Also:
        Constant Field Values
    • Method Detail

      • isFacebookEnabled

        default boolean isFacebookEnabled()
        Returns true if Facebook sharing is enabled in page configuration, false otherwise.
        Returns:
        true if Facebook sharing is enabled in page configuration, false otherwise
        Since:
        com.adobe.cq.wcm.core.components.models 11.0.0; marked default in 12.1.0
      • isPinterestEnabled

        default boolean isPinterestEnabled()
        Returns true if Pinterest sharing is enabled in page configuration, false otherwise.
        Returns:
        true if Pinterest sharing is enabled in page configuration, false otherwise
        Since:
        com.adobe.cq.wcm.core.components.models 11.0.0; marked default in 12.1.0
      • isSocialMediaEnabled

        default boolean isSocialMediaEnabled()
        Returns true if a supported social media sharing is enabled in page configuration, false otherwise.
        Returns:
        true if a supported social media sharing is enabled in page configuration, false otherwise
        Since:
        com.adobe.cq.wcm.core.components.models 11.0.0; marked default in 12.1.0
      • getFacebookAppId

        default String getFacebookAppId()
        Returns the value of the Facebook App ID if specified, null otherwise.
        Returns:
        the value of the Facebook App ID if specified, null otherwise.
        Since:
        com.adobe.cq.wcm.core.components.models 12.14.0; marked default in 12.14.0
      • hasFacebookSharing

        default boolean hasFacebookSharing()
        Returns true if Facebook sharing is enabled in page configuration and the page contains the sharing component, false otherwise.
        Returns:
        true if Facebook sharing is enabled in page configuration and the page contains the sharing component, false otherwise
        Since:
        com.adobe.cq.wcm.core.components.models 11.0.0; marked default in 12.1.0
      • hasPinterestSharing

        default boolean hasPinterestSharing()
        Returns true if Pinterest sharing is enabled in page configuration and the page contains the sharing component, false otherwise
        Returns:
        true if Pinterest sharing is enabled in page configuration and the page contains the sharing component, false otherwise
        Since:
        com.adobe.cq.wcm.core.components.models 11.0.0; marked default in 12.1.0
      • getMetadata

        default Map<String,​String> getMetadata()
        Returns the social media metadata for the current page.
        Returns:
        the social media metadata for the current page; the Map can be empty if there's no social media configuration
        Since:
        com.adobe.cq.wcm.core.components.models 11.0.0; marked default in 12.1.0