Logical Pipes

Those pipes help assembling pipes, or modifying the resource streams readers or writers could create.

Container Pipe

assemble a sequence of pipes

  • sling:resourceType is slingPipes/container
  • conf node contains child pipes' configurations, that will be configured in the order they are found (note you should use sling:OrderedFolder)

Note that pipe builder api automatically creates one for you to chain the subpipe you are configuring.

ReferencePipe (ref(path))

executes the pipe referenced in path property

  • sling:resourceType is slingPipes/reference
  • path path of the referenced pipe

FilterPipe (grep(conf))

outputs the input resource if its matches its configuration

  • sling:resourceType is slingPipes/filter
  • conf node tree that will be tested against the current input of the pipe, each /conf/sub@prop=value will triggers a test on ./sub@prop property of the current input, testing if its value matches value regex. If the special slingPipesFilter_noChildren=${true} property is there with the value instantiated as a true boolean, then filter will pass if corresponding node has no children.
  • slingPipesFilter_test='${...}' evaluates the property value, and filters out the stream if the expression is not a boolean or false
  • slingPipesFilter_not='true' inverts the expected result of the filter

as an example,


will either return /content/foo either nothing depending on it not containing @foo=bar

echo('content/foo').name('FOO').grep('slingPipesFilter_test','${FOO.foo == "bar"}').run()

is an equivalent


executes the pipe referenced in path property, passes input only if referenced pipe doesn't return any resource

  • sling:resourceType is slingPipes/not
  • path path of the referenced pipe