Package com.adobe.aem.wcm.seo
Interface SeoTags
-
@ConsumerType public interface SeoTags
This model interface gives access to SEO specific information of a page.It can be adapted from any
Page
's content that is a of sling:resourceTypewcm/foundation/components/basicpage/v1/basicpage
.Usage:
page.getContentResource().adaptTo(SeoTags.class)
-
-
Field Summary
Fields Modifier and Type Field Description static String
PN_ROBOTS_TAGS
The property name of the robots tags property.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull Map<Locale,String>
getAlternateLanguages()
Returns aMap
of alternate language urls of the current Resource.@Nullable String
getCanonicalUrl()
Returns the canonical url of the current Resource.@NotNull List<String>
getRobotsTags()
Returns aList
of robots tags to be provided to search engine crawlers.
-
-
-
Field Detail
-
PN_ROBOTS_TAGS
static final String PN_ROBOTS_TAGS
The property name of the robots tags property.- See Also:
- Constant Field Values
-
-
Method Detail
-
getCanonicalUrl
@Nullable @Nullable String getCanonicalUrl()
Returns the canonical url of the current Resource.This uses the
SitemapLinkExternalizer
implementation to ensure the same canonical url as it is used in Sitemap(s) is returned. The format of the url is complete, meaning it contains authority, path and extension.This may return
null
when the externalization fails.- Returns:
- The canonical, absolute url of the current page.
-
getAlternateLanguages
@NotNull @NotNull Map<Locale,String> getAlternateLanguages()
Returns aMap
of alternate language urls of the current Resource.An alternate language link exists for each language copy of the
Page
, when thePage
is included in a Sitemap. It uses theSitemapLinkExternalizer
to ensure the same canonical urls as in Sitemap(s) are returned. The format of the url is complete, meaning it contains authority, path and extension.- Returns:
- The canonical, absolute urls of all alternate language versions of the current page.
-
-