Zawartość pomocy dla wersji :

To obtain the page information, send a request to the PageInfo servlet to obtain the page metadata in JSON format.

The PageInfo servlet returns information about resources in the respository. The servlet is bound to the URL http://server:port/libs/wcm/core/content/pageinfo.json and uses the path parameter to identify the resource. The following example URL returns information about the /content/geometrixx-outdoors/en node:


Page Information Providers

Page components can be associated with one or more services that generate page metadata. The PageInfo servlet calls each PageInfoProvider service and aggregates the metadata:

  1. The HTTP client sends a request to the PageInfo servlet, which includes the URL of the page.
  2. The PageInfo servlet discovers which component renders the page.
  3. The PageInfo servlet calls each PageInfoProvider that is associated with the component.
  4. The servlet aggregates the metadata that each PageInfoProvider returns and adds the metadata to the HTTP response in a JSON object. 



Similar to PageInfoProviders, use ListInfoProviders to update lists of information in JSON format. (See Customizing the Websites Administration Console.)

Default Page Information Providers

The /libs/foundation/components/page component is associated with the following PageInfoProvider services:

  • Default Page Status Provider: Information about the page status, such as whether it is locked, whether the page is the payload of an active workflow, and which workflows are available for the page.
  • Live Relationship Info Provider: Information regarding Multi Site Management (MSM), such as whether the page is part of a Blue Print, and whether it is a Live Copy.
  • Content Language Servlet: The language of the current page, and information about each language in which the page is available.
  • Workflow Status Provider: Status information about the running workflow that has the page as a payload.
  • Workflow Package Info Provider: Information about each workflow package that is stored in the repository, and whether each package contains the current resource.
  • Emulator Info Provider: Information about the mobile device emulators that are available for this resource. If the page component does not render mobile pages, no emulators are available.
  • Annotations Info Provider: Information about annotations that are on the page.

For example, the PageInfo servlet returns the following JSON response for the /content/geometrixx-outdoors/en node:


    "status": {
        "path": "/content/geometrixx-outdoors/en",
        "isLocked": false,
        "lockOwner": "",
        "canUnlock": false,
        "isDesignable": true
    "workflow": {
        "isRunning": false
    "workflows": {
        "wcm": {
            "models": [
                    "wid": "/etc/workflow/models/publish_example/jcr:content/model",
                    "label": "Publish Example",
                    "label_xss": "Publish Example"
                    "wid": "/etc/workflow/models/request_for_activation/jcr:content/model",
                    "label": "Request for Activation",
                    "label_xss": "Request for Activation"
                    "wid": "/etc/workflow/models/request_for_deactivation/jcr:content/model",
                    "label": "Request for Deactivation",
                    "label_xss": "Request for Deactivation"
        "translation": {
            "models": [
                    "wid": "/etc/workflow/models/translation/jcr:content/model",
                    "label": "Translation",
                    "label_xss": "Translation"
    "translation": { },
    "design": {
        "path": "/etc/designs/geometrixx-outdoors",
        "lastModified": 1328083366095
    "componentsRef": "/libs/wcm/core/content/components.1346781932984.json",
    "msm": {
        "msm:isLiveCopy": false,
        "msm:isInBlueprint": true,
        "msm:isSource": true
    "language": "en",
    "languages": {
        "rows": [
                "path": "/content/geometrixx-outdoors/en",
                "exists": true,
                "hasContent": true,
                "lastModified": 0,
                "iso": "en",
                "country": "gb",
                "language": "English"
    "workflowInfo": {
        "isRunning": false
    "workflowPackageInfo": {
        "workflowPackages": [
                "path": "/etc/workflow/packages/MyWorkflowPackage",
                "title": "MyWorkflowPackage",
                "isInWorkflowPackage": false,
                "isRunning": false
        "selectedWorkflowPackages": [ ],
        "runningSelectedWorkflowPackages": [ ]
    "emulators": { },
    "annotations": [ ]


Filtering Workflow Package Information

Configure the Day CQ WCM Workflow Package Info Provider service so that it returns information about only the workflow packages in which you are interested. By default, the Workflow Package Info Provider service returns information about every workflow package in the repository. Iterating over a subset of workflow packages uses less server resources.


The Workflow tab of Sidekick uses the PageInfo servlet to obtain a list of workflow packages. From the list, you can select the package to which to add the current page. The filters that you create affect this list.

The ID of the service is To create a filter, specify a value for a workflowpackageinfoprovider.filter property.

Property values are prefixed with a + or - character followed by the package path:

  • The path is the path of the root node of the workflow package. The path uses the FileVault syntax.
  • To include a package, use the + prefix.
  • To exclude a package, use the - prefix. 

The service applies the cumulative result of all filters. For example, the following filter values exclude all workflow packages except for those in the Editions folder:



When working with AEM there are several methods of managing the configuration settings for such services; see Configuring OSGi for full details.

For example, to configure the service using CRXDE Lite:

  1. Open CRXDE Lite (http://localhost:4502/crx/de).
  2. In the config folder of your application, create a node:
    • Name:
    • Type: sling:OsgiConfig
  3. Select the node and add a property:
    • Name: workflowpackageinfoprovider.filter
    • Type: String[]
    • Value: The path to the workflow package using the correct format.
  4. Click Save All.

To configure the service in your project source:

  1. Locate or create the config folder for your CQ application in your project source. 

    For example, if you used the multimodule archetype of the Content Package Maven Plugin to create your project, the folder path is projectroot/content/src/ for example content/src/main/content/jcr_root/apps/appname/config.

  2. In the config folder, create a text file named
  3. Copy the following text to the file:

    <?xml version="1.0" encoding="UTF-8"?>
    <jcr:root xmlns:sling=""

  4. Inside the brackets ("[]") that surround the workflowpackageinfoprovider.filter property, type a comma-separated list of filter values similar to the following example:


  5. Save the file.

Creating a Page Information Provider

Create a custom Page Information Provider service to add page metadata that your application can easily obtain.

  1. Implement the interface.
  2. Bundle and deploy the class as an OSGi service.
  3. Create a page component in your application. Use foundation/components/page as the value of the sling:resourceSuperType property.
  4. Add a node below the component node named cq:infoProviders.
  5. Below the cq:infoProviders node, add a node for your PageInfoProvider service. You can specify any name for the node.
  6. Add the following property to your PageInfoProvider node:
    • Name: className
    • Type: String
    • Value: The PID of your PageInfoProvider service.

For resources that use your application page component as the sling:resourceType, the PageInfo servlet returns the custom PageInfoProvider metadata in addition to the default PageInfoProvider metadata.

Example PageInfoProvider implementation

The following Java class implements PageInfoProvider and returns the published URL of the current page resource.

package com.adobe.example;

import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Properties;
import org.apache.felix.scr.annotations.Property;
import org.apache.felix.scr.annotations.ReferenceCardinality;
import org.apache.felix.scr.annotations.Service;
import org.apache.felix.scr.annotations.Reference;




@Component(metatype = false)
	@Property(name="service.description", value="Returns the public URL of a resource.")
public class PageUrlInfoProvider implements PageInfoProvider {

	@Reference(cardinality = ReferenceCardinality.OPTIONAL_UNARY)
	private externalizer;

	private String fetchExternalUrl(ResourceResolver rr, String path) {
		return externalizer.publishLink(rr, path);

	public void updatePageInfo(SlingHttpServletRequest request, JSONObject info, Resource resource)
			throws JSONException {

		Page page = resource.adaptTo(Page.class);
		JSONObject urlinfo = new JSONObject();
		urlinfo.put("publishURL", fetchExternalUrl(null,page.getPath()));

The following example, in CRXDE Lite, shows the page component of the geometrixx-outdoors application that is configured to use the PageUrlInfoProvider service:



The PageUrlInfoProvider service returns the following data for the /content/geometrixx-outdoors/en node:

"URLs": {
    "publishURL": "http://localhost:4503/content/geometrixx-outdoors/en"