@ConsumerType public interface SocialMediaHelper extends ComponentExporter
/apps/core/wcm/components/sharing
component.Modifier and Type | Field and Description |
---|---|
static String |
PN_SOCIAL_MEDIA
Name of the resource property that will indicate which social networks are supported for social sharing.
|
static String |
PN_VARIANT_PATH
Name of the resource property that will indicate which page variant has been used for social sharing.
|
static String |
PV_FACEBOOK
Possible value of the
PN_SOCIAL_MEDIA resource property. |
static String |
PV_PINTEREST
Possible value of the
PN_SOCIAL_MEDIA resource property. |
Modifier and Type | Method and Description |
---|---|
default @NotNull String |
getExportedType()
Returns the type of the resource for which the export is performed.
|
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. |
static final String PN_SOCIAL_MEDIA
PV_FACEBOOK
,
PV_PINTEREST
,
Constant Field Valuesstatic final String PN_VARIANT_PATH
static final String PV_FACEBOOK
PN_SOCIAL_MEDIA
resource property.static final String PV_PINTEREST
PN_SOCIAL_MEDIA
resource property.default boolean isFacebookEnabled()
true
if Facebook sharing is enabled in page configuration, false
otherwise.true
if Facebook sharing is enabled in page configuration, false
otherwisedefault
in 12.1.0default boolean isPinterestEnabled()
true
if Pinterest sharing is enabled in page configuration, false
otherwise.true
if Pinterest sharing is enabled in page configuration, false
otherwisedefault
in 12.1.0default boolean isSocialMediaEnabled()
true
if a supported social media sharing is enabled in page configuration, false
otherwise.true
if a supported social media sharing is enabled in page configuration, false
otherwisedefault
in 12.1.0default boolean hasFacebookSharing()
true
if Facebook sharing is enabled in page configuration and the page contains the sharing component, false
otherwise.true
if Facebook sharing is enabled in page configuration and the page contains the sharing component, false
otherwisedefault
in 12.1.0default boolean hasPinterestSharing()
true
if Pinterest sharing is enabled in page configuration and the page contains the sharing component, false
otherwisetrue
if Pinterest sharing is enabled in page configuration and the page contains the sharing component, false
otherwisedefault
in 12.1.0default Map<String,String> getMetadata()
Map
can be empty if there's no social media configurationdefault
in 12.1.0@NotNull default @NotNull String getExportedType()
ComponentExporter
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.
getExportedType
in interface ComponentExporter
ComponentExporter.getExportedType()
Copyright © 2010 - 2020 Adobe. All Rights Reserved