Interface Page
-
- All Superinterfaces:
Component,ComponentExporter,ContainerExporter
@ConsumerType public interface Page extends ContainerExporter, Component
Defines thePageSling Model used for the/apps/core/wcm/components/pagecomponent.- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static StringFN_FAVICON_ICOExpected file name for the regular favicon file.static StringFN_FAVICON_PNGExpected file name for the PNG-format favicon file.static StringFN_TOUCH_ICON_120Expected file name for the touch 120px square favicon file.static StringFN_TOUCH_ICON_152Expected file name for the touch 152px square favicon file.static StringFN_TOUCH_ICON_60Expected file name for the touch 60px square favicon file.static StringFN_TOUCH_ICON_76Expected file name for the touch 76px square favicon file.static StringNN_PAGE_FEATURED_IMAGEName of the node holding the properties of the featured image of the page.static StringPN_APP_RESOURCES_CLIENTLIBName of the configuration policy property that will store the category of the client library from which web application resources will be served.static StringPN_FAVICON_ICOKey used for the regular favicon file.static StringPN_FAVICON_PNGKey for the PNG-format favicon file.static StringPN_TOUCH_ICON_120Key for the touch-enabled 120px square favicon file.static StringPN_TOUCH_ICON_152Key for the touch-enabled 152px square favicon file.static StringPN_TOUCH_ICON_60Key for the touch-enabled 60px square favicon file.static StringPN_TOUCH_ICON_76Key for the touch-enabled 76px square favicon file.
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default @NotNull Map<Locale,String>getAlternateLanguageLinks()Returns aMapof alternate languages of the page.default @Nullable StringgetAppResourcesPath()Returns the root path of the application's web resources (e.g.default StringgetBrandSlug()Returns the brand slug of this page.default @Nullable StringgetCanonicalLink()Returns the canonical link of the page.default String[]getClientLibCategories()If this page is associated with a Template, then this method will return the Template's client library categories to be included in the page as defined by the user in the policy.default String[]getClientLibCategoriesJsBody()If this page is associated with a Template, then this method will return the JavaScript client library categories which are intended specifically to be loaded at the page body end (JavaScript only), as defined by the user in the policy.default String[]getClientLibCategoriesJsHead()If this page is associated with a Template, then this method will return the JavaScript client library categories which are intended specifically to be loaded up front in the page head (JavaScript only), as defined by the user in the policy.default @NotNull Set<String>getComponentsResourceTypes()Returns a set of resource types for components included in the page.default StringgetCssClassNames()Returns the CSS classes defined for the pagedefault StringgetDescription()Returns the description of this page.default StringgetDesignPath()Retrieves the page's design path.default @NotNull Map<String,? extends ComponentExporter>getExportedItems()Returns the map of all exported child items (resource names from Sling Model classes).default @NotNull String[]getExportedItemsOrder()Returns the order of items in the map.default @NotNull StringgetExportedType()Returns the type of the resource for which the export is performed.default Map<String,String>getFavicons()Deprecated.since 12.2.0default @Nullable List<HtmlPageItem>getHtmlPageItems()Returns a list of HTML items that should be included in the pagedefault String[]getKeywords()Returns an array with the page's keywords.default StringgetLanguage()Returns the language of this page, if one has been defined.default CalendargetLastModifiedDate()Returns the last modified date of this page.default @Nullable StringgetMainContentSelector()Returns the selector for the main content element of the page (used by the "skip to main content" accessibility feature)default @Nullable NavigationItemgetRedirectTarget()Returns the target page if this page is redirecting to another page.default @NotNull List<String>getRobotsTags()Returns a list of robots meta tags configured for the page.default StringgetStaticDesignPath()Retrieves the static design path ifstatic.cssexists in the design path.default StringgetTemplateName()Returns the template name of the currently used template.default StringgetTitle()Returns the title of this page.default booleanhasCloudconfigSupport()Checks if there's support for cloudconfig script tags so they can be added to page header/footerdefault booleanisClientlibsAsync()Checks if the Javascript libraries should be loaded asynchronously.-
Methods inherited from interface com.adobe.cq.wcm.core.components.models.Component
getAppliedCssClasses, getData, getId
-
-
-
-
Field Detail
-
PN_FAVICON_ICO
static final String PN_FAVICON_ICO
Key used for the regular favicon file.- Since:
- com.adobe.cq.wcm.core.components.models 11.1.0
- See Also:
getFavicons(), Constant Field Values
-
PN_FAVICON_PNG
static final String PN_FAVICON_PNG
Key for the PNG-format favicon file.- Since:
- com.adobe.cq.wcm.core.components.models 11.1.0
- See Also:
getFavicons(), Constant Field Values
-
PN_TOUCH_ICON_60
static final String PN_TOUCH_ICON_60
Key for the touch-enabled 60px square favicon file.- Since:
- com.adobe.cq.wcm.core.components.models 11.1.0
- See Also:
getFavicons(), Constant Field Values
-
PN_TOUCH_ICON_76
static final String PN_TOUCH_ICON_76
Key for the touch-enabled 76px square favicon file.- Since:
- com.adobe.cq.wcm.core.components.models 11.1.0
- See Also:
getFavicons(), Constant Field Values
-
PN_TOUCH_ICON_120
static final String PN_TOUCH_ICON_120
Key for the touch-enabled 120px square favicon file.- Since:
- com.adobe.cq.wcm.core.components.models 11.1.0
- See Also:
getFavicons(), Constant Field Values
-
PN_TOUCH_ICON_152
static final String PN_TOUCH_ICON_152
Key for the touch-enabled 152px square favicon file.- Since:
- com.adobe.cq.wcm.core.components.models 11.1.0
- See Also:
getFavicons(), Constant Field Values
-
PN_APP_RESOURCES_CLIENTLIB
static final String PN_APP_RESOURCES_CLIENTLIB
Name of the configuration policy property that will store the category of the client library from which web application resources will be served.- Since:
- com.adobe.cq.wcm.core.components.models 12.2.0
- See Also:
- Constant Field Values
-
FN_FAVICON_ICO
static final String FN_FAVICON_ICO
Expected file name for the regular favicon file.- Since:
- com.adobe.cq.wcm.core.components.models 11.1.0
- See Also:
getFavicons(), Constant Field Values
-
FN_FAVICON_PNG
static final String FN_FAVICON_PNG
Expected file name for the PNG-format favicon file.- Since:
- com.adobe.cq.wcm.core.components.models 11.1.0
- See Also:
getFavicons(), Constant Field Values
-
FN_TOUCH_ICON_60
static final String FN_TOUCH_ICON_60
Expected file name for the touch 60px square favicon file.- Since:
- com.adobe.cq.wcm.core.components.models 11.1.0
- See Also:
getFavicons(), Constant Field Values
-
FN_TOUCH_ICON_76
static final String FN_TOUCH_ICON_76
Expected file name for the touch 76px square favicon file.- Since:
- com.adobe.cq.wcm.core.components.models 11.1.0
- See Also:
getFavicons(), Constant Field Values
-
FN_TOUCH_ICON_120
static final String FN_TOUCH_ICON_120
Expected file name for the touch 120px square favicon file.- Since:
- com.adobe.cq.wcm.core.components.models 11.1.0
- See Also:
getFavicons(), Constant Field Values
-
FN_TOUCH_ICON_152
static final String FN_TOUCH_ICON_152
Expected file name for the touch 152px square favicon file.- Since:
- com.adobe.cq.wcm.core.components.models 11.1.0
- See Also:
getFavicons(), Constant Field Values
-
NN_PAGE_FEATURED_IMAGE
static final String NN_PAGE_FEATURED_IMAGE
Name of the node holding the properties of the featured image of the page.- Since:
- com.adobe.cq.wcm.core.components.models 12.21.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
getLanguage
default String getLanguage()
Returns the language of this page, if one has been defined. Otherwise the defaultLocalewill be used.- Returns:
- the language code (IETF BCP 47) for this page
- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
defaultin 12.1.0
-
getLastModifiedDate
default Calendar getLastModifiedDate()
Returns the last modified date of this page.- Returns:
Calendarrepresenting the last modified date of this page- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
defaultin 12.1.0
-
getKeywords
default String[] getKeywords()
Returns an array with the page's keywords.- Returns:
- an array of keywords represented as
Strings; the array can be empty if no keywords have been defined for the page - Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
defaultin 12.1.0
-
getDesignPath
default String getDesignPath()
Retrieves the page's design path.- Returns:
- the design path as a
String - Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
defaultin 12.1.0
-
getStaticDesignPath
default String getStaticDesignPath()
Retrieves the static design path ifstatic.cssexists in the design path.- Returns:
- the static design path if it exists,
nullotherwise - Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
defaultin 12.1.0
-
getFavicons
@Deprecated default Map<String,String> getFavicons()
Deprecated.since 12.2.0Retrieves the paths to the various favicons for the website as
<favicon_name>:<path>pairs.If a file corresponding to a particular type of favicon is found under the page's design path, then the <favicon_name>:<path> pair is added to the map, otherwise that type of favicon is ignored. The following list defines the currently supported favicons along with their brief descriptions:
PN_FAVICON_ICO: The favicon.ico faviconPN_FAVICON_PNG: The png version of the faviconPN_TOUCH_ICON_60: The touch icon with size 60pxPN_TOUCH_ICON_76: The touch icon with size 76pxPN_TOUCH_ICON_120: The touch icon with size 120pxPN_TOUCH_ICON_152: The touch icon with size 152px
- Returns:
Mapcontaining the names of the favicons and their corresponding paths- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
defaultin 12.1.0
-
getTitle
default String getTitle()
Returns the title of this page.- Returns:
- the page's title
- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
defaultin 12.1.0
-
getDescription
default String getDescription()
Returns the description of this page.- Returns:
- the page's description
- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
defaultin 12.23.0
-
getBrandSlug
default String getBrandSlug()
Returns the brand slug of this page.- Returns:
- the page's brandSlug
- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
defaultin 12.18.0
-
getClientLibCategories
default String[] getClientLibCategories()
If this page is associated with a Template, then this method will return the Template's client library categories to be included in the page as defined by the user in the policy.- Returns:
- an array of client library categories to be included; the array can be empty if the page doesn't have an associated template or if the template has no client libraries defined.
- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
defaultin 12.1.0
-
getClientLibCategoriesJsBody
default String[] getClientLibCategoriesJsBody()
If this page is associated with a Template, then this method will return the JavaScript client library categories which are intended specifically to be loaded at the page body end (JavaScript only), as defined by the user in the policy.- Returns:
- an array of JavaScript client library categories which are expected to be loaded at the page body end; the array can be empty if the page doesn't have an associated template or if the template has no body client libraries defined.
- Since:
- com.adobe.cq.wcm.core.components.models 12.5.0;
-
getClientLibCategoriesJsHead
default String[] getClientLibCategoriesJsHead()
If this page is associated with a Template, then this method will return the JavaScript client library categories which are intended specifically to be loaded up front in the page head (JavaScript only), as defined by the user in the policy.- Returns:
- an array of JavaScript client library categories which are expected to be loaded in the page head; the array can be empty if the page doesn't have an associated template or if the template has no head client libraries defined.
- Since:
- com.adobe.cq.wcm.core.components.models 12.5.0;
-
getTemplateName
default String getTemplateName()
Returns the template name of the currently used template.- Returns:
- the template name of the current template
- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0; marked
defaultin 12.1.0
-
getAppResourcesPath
@Nullable default @Nullable String getAppResourcesPath()
Returns the root path of the application's web resources (e.g. favicons, application manifest, etc.).- Returns:
- resources path; can return
nullif no such resources were defined - Since:
- com.adobe.cq.wcm.core.components.models 12.2.0
-
getCssClassNames
default String getCssClassNames()
Returns the CSS classes defined for the page- Returns:
Stringcontaining the CSS classes defined for the page, if one class exists,nullotherwise- Since:
- com.adobe.cq.wcm.core.components.models 12.2.0
-
getRedirectTarget
@Nullable default @Nullable NavigationItem getRedirectTarget()
Returns the target page if this page is redirecting to another page.- Returns:
NavigationItemof redirect target- Since:
- com.adobe.cq.wcm.core.components.models 12.2.0
-
hasCloudconfigSupport
default boolean hasCloudconfigSupport()
Checks if there's support for cloudconfig script tags so they can be added to page header/footer- Returns:
trueif there's support for cloudconfig script tags- Since:
- com.adobe.cq.wcm.core.components.models 12.3.0
-
getComponentsResourceTypes
@NotNull default @NotNull Set<String> getComponentsResourceTypes()
Returns a set of resource types for components included in the page.- Returns:
- Resource types for components included in the page
- Since:
- com.adobe.cq.wcm.core.components.models 12.14.0
-
getExportedItemsOrder
@NotNull default @NotNull String[] getExportedItemsOrder()
Description copied from interface:ContainerExporterReturns the order of items in the map.
NOTE: This information is required because the JSON specification and most implementations don't provide a stable order of items in JSON objects. Methods whose JSON serialization would lead to the same JSON property name (":order") will not be serialized.
- Specified by:
getExportedItemsOrderin interfaceContainerExporter- Returns:
- the order of the items in the map; the array can be empty if the item order is not provided by the underlying persistence layer
- Since:
- com.adobe.cq.wcm.core.components.models 12.2.0
- See Also:
ContainerExporter.getExportedItemsOrder()
-
getExportedItems
@NotNull default @NotNull Map<String,? extends ComponentExporter> getExportedItems()
Description copied from interface:ContainerExporterReturns the map of all exported child items (resource names from Sling Model classes).
NOTE: Methods whose JSON serialization would lead to the same JSON property name (":items") will not be serialized.
- Specified by:
getExportedItemsin interfaceContainerExporter- Returns:
- the map of all exported child items
- Since:
- com.adobe.cq.wcm.core.components.models 12.2.0
- See Also:
ContainerExporter.getExportedItems()
-
getExportedType
@NotNull default @NotNull 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()
-
getMainContentSelector
@Nullable default @Nullable String getMainContentSelector()
Returns the selector for the main content element of the page (used by the "skip to main content" accessibility feature)- Returns:
- selector for the main content element
- Since:
- com.adobe.cq.wcm.core.components.models 12.4.0
-
getHtmlPageItems
@Nullable default @Nullable List<HtmlPageItem> getHtmlPageItems()
Returns a list of HTML items that should be included in the page- Returns:
- list of page items
- Since:
- com.adobe.cq.wcm.core.components.models 12.16.0
-
getCanonicalLink
@Nullable default @Nullable String getCanonicalLink()
Returns the canonical link of the page.This should be an absolute url.
- Returns:
- the canonical url of the page
- Since:
- om.adobe.cq.wcm.core.components.models 12.22.0
-
getAlternateLanguageLinks
@NotNull default @NotNull Map<Locale,String> getAlternateLanguageLinks()
Returns aMapof alternate languages of the page.The
Mapmaps each alternate language to an absolute url to the page in this language, if it exists.- Returns:
- a
Mapof alternate languages and links to the page in this language - Since:
- om.adobe.cq.wcm.core.components.models 12.22.0
-
getRobotsTags
@NotNull default @NotNull List<String> getRobotsTags()
Returns a list of robots meta tags configured for the page.The list is cleared from duplicates and conflicting combinations.
- Returns:
- a list of robots meta tags
- Since:
- om.adobe.cq.wcm.core.components.models 12.22.0
-
isClientlibsAsync
default boolean isClientlibsAsync()
Checks if the Javascript libraries should be loaded asynchronously.- Returns:
trueif the Javascript libraries should be loaded asynchronously- Since:
- om.adobe.cq.wcm.core.components.models 12.24.0
-
-