Interface SocialMediaHelper
-
- All Superinterfaces:
Component,ComponentExporter
@ConsumerType public interface SocialMediaHelper extends Component
Defines the Sling Model for the/apps/core/wcm/components/sharingcomponent.- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPN_FACEBOOK_APP_IDName of the property that will return the Facebook App ID.static java.lang.StringPN_SOCIAL_MEDIAName of the resource property that will indicate which social networks are supported for social sharing.static java.lang.StringPN_VARIANT_PATHName of the resource property that will indicate which page variant has been used for social sharing.static java.lang.StringPV_FACEBOOKPossible value of thePN_SOCIAL_MEDIAresource property.static java.lang.StringPV_PINTERESTPossible value of thePN_SOCIAL_MEDIAresource property.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default @NotNull java.lang.StringgetExportedType()Returns the type of the resource for which the export is performed.default java.lang.StringgetFacebookAppId()Returns the value of the Facebook App ID if specified, null otherwise.default java.util.Map<java.lang.String,java.lang.String>getMetadata()Returns the social media metadata for the current page.default booleanhasFacebookSharing()Returnstrueif Facebook sharing is enabled in page configuration and the page contains the sharing component,falseotherwise.default booleanhasPinterestSharing()Returnstrueif Pinterest sharing is enabled in page configuration and the page contains the sharing component,falseotherwisedefault booleanisFacebookEnabled()Returnstrueif Facebook sharing is enabled in page configuration,falseotherwise.default booleanisPinterestEnabled()Returnstrueif Pinterest sharing is enabled in page configuration,falseotherwise.default booleanisSocialMediaEnabled()Returnstrueif a supported social media sharing is enabled in page configuration,falseotherwise.
-
-
-
Field Detail
-
PN_SOCIAL_MEDIA
static final java.lang.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 java.lang.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
-
PV_FACEBOOK
static final java.lang.String PV_FACEBOOK
Possible value of thePN_SOCIAL_MEDIAresource property.- Since:
- com.adobe.cq.wcm.core.components.models 11.1.0
- See Also:
- Constant Field Values
-
PN_FACEBOOK_APP_ID
static final java.lang.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
-
PV_PINTEREST
static final java.lang.String PV_PINTEREST
Possible value of thePN_SOCIAL_MEDIAresource property.- Since:
- com.adobe.cq.wcm.core.components.models 11.1.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
isFacebookEnabled
default boolean isFacebookEnabled()
Returnstrueif Facebook sharing is enabled in page configuration,falseotherwise.- Returns:
trueif Facebook sharing is enabled in page configuration,falseotherwise- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
defaultin 12.1.0
-
isPinterestEnabled
default boolean isPinterestEnabled()
Returnstrueif Pinterest sharing is enabled in page configuration,falseotherwise.- Returns:
trueif Pinterest sharing is enabled in page configuration,falseotherwise- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
defaultin 12.1.0
-
isSocialMediaEnabled
default boolean isSocialMediaEnabled()
Returnstrueif a supported social media sharing is enabled in page configuration,falseotherwise.- Returns:
trueif a supported social media sharing is enabled in page configuration,falseotherwise- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
defaultin 12.1.0
-
getFacebookAppId
default java.lang.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
defaultin 12.14.0
-
hasFacebookSharing
default boolean hasFacebookSharing()
Returnstrueif Facebook sharing is enabled in page configuration and the page contains the sharing component,falseotherwise.- Returns:
trueif Facebook sharing is enabled in page configuration and the page contains the sharing component,falseotherwise- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
defaultin 12.1.0
-
hasPinterestSharing
default boolean hasPinterestSharing()
Returnstrueif Pinterest sharing is enabled in page configuration and the page contains the sharing component,falseotherwise- Returns:
trueif Pinterest sharing is enabled in page configuration and the page contains the sharing component,falseotherwise- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
defaultin 12.1.0
-
getMetadata
default java.util.Map<java.lang.String,java.lang.String> getMetadata()
Returns the social media metadata for the current page.- Returns:
- the social media metadata for the current page; the
Mapcan be empty if there's no social media configuration - Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
defaultin 12.1.0
-
getExportedType
@NotNull default @NotNull java.lang.String getExportedType()
Description copied from interface:ComponentExporterReturns 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.
- Specified by:
getExportedTypein interfaceComponent- Specified by:
getExportedTypein interfaceComponentExporter- Returns:
- the type of the component
- Since:
- com.adobe.cq.wcm.core.components.models 12.2.0
- See Also:
ComponentExporter.getExportedType()
-
-