Interface Page
-
- All Superinterfaces:
Component
,ComponentExporter
,ContainerExporter
@ConsumerType public interface Page extends ContainerExporter, Component
Defines thePage
Sling Model used for the/apps/core/wcm/components/page
component.- Since:
- com.adobe.cq.wcm.core.components.models 11.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static String
FN_FAVICON_ICO
Expected file name for the regular favicon file.static String
FN_FAVICON_PNG
Expected file name for the PNG-format favicon file.static String
FN_TOUCH_ICON_120
Expected file name for the touch 120px square favicon file.static String
FN_TOUCH_ICON_152
Expected file name for the touch 152px square favicon file.static String
FN_TOUCH_ICON_60
Expected file name for the touch 60px square favicon file.static String
FN_TOUCH_ICON_76
Expected file name for the touch 76px square favicon file.static String
NN_PAGE_FEATURED_IMAGE
Name of the node holding the properties of the featured image of the page.static 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.static String
PN_FAVICON_ICO
Key used for the regular favicon file.static String
PN_FAVICON_PNG
Key for the PNG-format favicon file.static String
PN_TOUCH_ICON_120
Key for the touch-enabled 120px square favicon file.static String
PN_TOUCH_ICON_152
Key for the touch-enabled 152px square favicon file.static String
PN_TOUCH_ICON_60
Key for the touch-enabled 60px square favicon file.static String
PN_TOUCH_ICON_76
Key for the touch-enabled 76px square favicon file.
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default @Nullable String
getAppResourcesPath()
Returns the root path of the application's web resources (e.g.default String
getBrandSlug()
Returns the brand slug of this 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 String
getCssClassNames()
Returns the CSS classes defined for the pagedefault String
getDesignPath()
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 String
getExportedType()
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 String
getLanguage()
Returns the language of this page, if one has been defined.default Calendar
getLastModifiedDate()
Returns the last modified date of this page.default @Nullable String
getMainContentSelector()
Returns the selector for the main content element of the page (used by the "skip to main content" accessibility feature)default @Nullable NavigationItem
getRedirectTarget()
Returns the target page if this page is redirecting to another page.default String
getStaticDesignPath()
Retrieves the static design path ifstatic.css
exists in the design path.default String
getTemplateName()
Returns the template name of the currently used template.default String
getTitle()
Returns the title of this page.default boolean
hasCloudconfigSupport()
Checks if there's support for cloudconfig script tags so they can be added to page header/footer-
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 defaultLocale
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
String
s; 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 ifstatic.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.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:
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
-
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 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: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 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: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 interfaceComponent
- Specified by:
getExportedType
in 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
-
-