Interface Page

All Superinterfaces:
Component, ComponentExporter, ContainerExporter

@ConsumerType public interface Page extends ContainerExporter, Component
Defines the Page Sling Model used for the /apps/core/wcm/components/page component.
Since:
com.adobe.cq.wcm.core.components.models 11.0.0
  • Field Details

    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
  • Method Details

    • getLanguage

      default String getLanguage()
      Returns the language of this page, if one has been defined. Otherwise the default Locale will be used.
      Returns:
      the language code (IETF BCP 47) for this page
      Since:
      com.adobe.cq.wcm.core.components.models 11.0.0; marked default in 12.1.0
    • getLastModifiedDate

      default Calendar getLastModifiedDate()
      Returns the last modified date of this page.
      Returns:
      Calendar representing the last modified date of this page
      Since:
      com.adobe.cq.wcm.core.components.models 11.0.0; marked default in 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 default in 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 default in 12.1.0
    • getStaticDesignPath

      default String getStaticDesignPath()
      Retrieves the static design path if static.css exists in the design path.
      Returns:
      the static design path if it exists, null otherwise
      Since:
      com.adobe.cq.wcm.core.components.models 11.0.0; marked default in 12.1.0
    • getFavicons

      @Deprecated default Map<String,String> getFavicons()
      Deprecated.
      since 12.2.0

      Retrieves 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:

      Returns:
      Map containing the names of the favicons and their corresponding paths
      Since:
      com.adobe.cq.wcm.core.components.models 11.0.0; marked default in 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 default in 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 default in 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 default in 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 default in 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 default in 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 null if 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:
      String containing the CSS classes defined for the page, if one class exists, null otherwise
      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:
      NavigationItem of 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:
      true if 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: ContainerExporter

      Returns 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:
      getExportedItemsOrder in interface ContainerExporter
      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:
    • getExportedItems

      @NotNull default @NotNull Map<String,? extends ComponentExporter> getExportedItems()
      Description copied from interface: ContainerExporter

      Returns 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:
      getExportedItems in interface ContainerExporter
      Returns:
      the map of all exported child items
      Since:
      com.adobe.cq.wcm.core.components.models 12.2.0
      See Also:
    • getExportedType

      @NotNull default @NotNull String getExportedType()
      Description copied from interface: 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.

      Specified by:
      getExportedType in interface Component
      Specified by:
      getExportedType in interface ComponentExporter
      Returns:
      the type of the component
      Since:
      com.adobe.cq.wcm.core.components.models 12.2.0
      See Also:
    • 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 a Map of alternate languages of the page.

      The Map maps each alternate language to an absolute url to the page in this language, if it exists.

      Returns:
      a Map of 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:
      true if the Javascript libraries should be loaded asynchronously
      Since:
      om.adobe.cq.wcm.core.components.models 12.24.0
    • isDataLayerClientlibIncluded

      default boolean isDataLayerClientlibIncluded()
      Checks if the data layer client library should be included. true if the data layer client library should be included.
      Since:
      om.adobe.cq.wcm.core.components.models 12.24.0
    • getDataLayerName

      default String getDataLayerName()
      Returns the name of the data layer. true if the data layer client library should be included.
      Since:
      om.adobe.cq.wcm.core.components.models 12.24.0