Console Browser

(/bin/browser.html)

The Composum Browser is part of the Composum Console and gives you the ability to explore your Sling repository with a lot of useful features:

  • repository tree with configurable filters
  • node creation / deletion / move / reorder
  • property manipulation
  • binary data upload / download
  • component rendering and asset view
  • template based queries with history
  • JSON view, download and upload
  • ACL view and manipulation
  • Groovy script execution

It is one of the standard parts of the Apache Sling Starter.

Features

Display View

If you select the preview tab in your node browser then each node which can be displayed such as pages, renderable content nodes, images and videos is rendered on node selection. For all renderable content nodes (must have a 'sling:resourceType' property) the URL can be parameterized in the user interface.

During browsing through the repository the appropriate view type (HTML, image, video) for the selected node is displayed automatically. If the HTML view type is shown a set of properties can be specified to modify the URL used to render the node.

The URL to the nodes view is built by the following rule:

[<path prefix>]<node path>[.<selectors>][.<extension>][/<suffix>][?<parameters]

Each modifier is used only to build the URL if not empty; the extension is used as specified if not empty otherwise 'html' is used as default extension instead of the specified value is '-'; in this case no extension is added to the nodes URL.

You can open this URL in a new browser tab by clicking on the rightmost button in the HTML view toolbar. With the leftmost button you are toggling the mapping mode for the URL; if mapping is 'on' the URL is transformed by a final 'resolver.map()'.

Useful Servlet URL patterns for the Display View

Source Servlet

The source servlet generates 'source code' of the repository content (trees of '.content.xml' files). A generated content source XML file doesn't contain dynamic repository properties such as 'jrc:lastModified'. Files (subnodes of type 'nt:file') are embedded as simple files in the ZIP or Package output.

/bin/cpm/nodes/source.xml

<path to resource> (no <ext>!)

Download / View the XML source code (.content.xml file) for a single page...

/bin/cpm/nodes/source.zip

<path to resource> (no <ext>!)

Download the whole tree of a page and their subpages as ZIP file.

/bin/cpm/nodes/source.pkg

<path to resource> (no <ext>!)

Download the whole tree of a page and their subpages as Package ZIP file.

Composum Pages

/bin/pages.html

<path to resource>[.<ext>]

Visualize the edit view of 'Composum Pages' with the current resource within...

Adobe AEM (CQ5)

/editor.html

<path to resource>.<ext>

Visualize the edit view of AEMs Touch UI with the current resource within...

/cf#

<path to resource>.<ext>

Visualize the content finder of AEMs ClassicUI with the current resource within...

Favorites

Working in the Repository you often switch between different nodes. To make this easier the 'favorites' feature is now available. You can mark resources as favorites and toggle between the tree view and the favorites view in the left navigation area.

The favorites view lists all marked favorites sorted by their path on the views top area. The bottom area lists the last 20 resources selected recently. This list is filled automatically.

Script Runner

Since release 1.5 this script runner uses a new job control service to execute scripts controlled by an asynchronous job. The user interface is synchonized with the current job state and an audit log is written including the complete execution output.

Selecting a node which is a Groovy script file an additional feature is available in the text view of such a node. This Groovy Runner feature enables the execution of the selected script on the repositories server.

The script implementation provides some useful variables to access the repository such as the session, a resource resolver, the bundle context and much more, but you can configure your own script runner setup script in the OSGi configuration.

Filters

selects all resources which name ends as 'page' and starts with a namespace or file resources with the HTML mime type.

You can select your filter in the tree actions toolbar on the bottom of the tree. The selected filter is also used to filter out the query results unless this filter usage is switched off in the query panel.

The resource tree uses filters to define the current scope of interest of the resource content. The 'default' filter for example hides all special content nodes of the repository such as ACLs or node types. If you want to see all resources/nodes the the 'unfiltered' filter configuration is the right choice.

Some filters are preconfigured and used by the Composum Console Browser implementation for special purposes such as the selection of node reference targets (needs 'referenceable' nodes) with the preconfigured 'referenceable' filter.

All Filter configurations can be modified or extended in the OSGi configuration (Composum Core Configuration). You can add your own filters or modify the preconfigured filters. A filter is declared by a string in a kind of an RPN using short names of the filter implementation classes and regular expressions to describe the filter rules, for example - the 'Page' filter:

or{ResourceType(+'^[a-z]+:.*[Pp]age$'),and{PrimaryType(+'^nt:file$'),MimeType(+'^text/html$')}}