This is an automated email from the ASF dual-hosted git repository.
npeltier pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/sling-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new bac4723 SLING-7708 update pipes documentation
bac4723 is described below
commit bac4723a7968c36f641929251518f7fad9cf5b5c
Author: Nicolas Peltier <[email protected]>
AuthorDate: Mon Oct 8 17:11:55 2018 +0200
SLING-7708 update pipes documentation
---
documentation/bundles/sling-pipes.html | 13 +++++++++---
documentation/bundles/sling-pipes/bindings.html | 4 ++--
.../bundles/sling-pipes/execution-monitoring.html | 9 ++++++---
documentation/bundles/sling-pipes/logical.html | 19 ++++++++++++++----
documentation/bundles/sling-pipes/readers.html | 16 +++++++++++++--
documentation/bundles/sling-pipes/writers.html | 23 ++++++++++++++++++++--
repolist.html | 4 ----
7 files changed, 68 insertions(+), 20 deletions(-)
diff --git a/documentation/bundles/sling-pipes.html
b/documentation/bundles/sling-pipes.html
index 56243bc..2dd58fa 100644
--- a/documentation/bundles/sling-pipes.html
+++ b/documentation/bundles/sling-pipes.html
@@ -98,9 +98,16 @@
</code></pre>
<p>Such sentence with that limited amount of words is enough between two sling
developers to understand fully what it is doing. However, implementing this as
a servlet would take a lot more words, risks of failure, complexity of
deployement and would be more opaque, not talking about monitoring or execution
common, but complex features you'd like to add.</p>
<p>With Sling Pipes, what you need to develop, and what is readable by another
developer is</p>
-<pre><code>
plumber.newPipe(resolver).$("[sling:resourceType='foo/bar']").write("id",3).build("/etc/demo")
+<pre><code>
plumber.newPipe(resolver).$("foo/bar").write("id",3).build("/etc/demo")
</code></pre>
-<p>this is enough to persist a pipe in <code>/etc/demo</code> that is
executable as http, java, groovy console script, or JMX. You can make it
monitor it with JMX, logs, http, you'll have dry run possibility of that
execution for example, or asynchronous execution. You could also use a pipe to
create a java-free json or csv servlet, or a list component whose list
possibilities are pipes accessed through the <code>PipeModel</code> </p>
+<p>this is enough to persist a pipe in <code>/etc/demo</code> that is
executable as http, java, groovy console script, or JMX. You can make it
monitor it with JMX, logs, http, you'll have dry run possibility of that
execution for example, or asynchronous execution. You could also use a pipe to
create a java-free json or csv servlet, or a list component whose list
possibilities are pipes accessed through the <code>PipeModel</code></p>
+<p>you can check some introductions at different adaptTo presentations:</p>
+<h2><a href="#adaptto-introductions" name="adaptto-introductions">AdaptTo
introductions</a></h2>
+<p>some presentations were made at the adaptTo conference, last two were:</p>
+<p><a
href="https://adapt.to/2017/en/schedule/lightning-talks/apache-sling-pipes.html">General
introduction at a 2017 lightning talk</a>.</p>
+<iframe width="560" height="315"
src="https://www.youtube.com/embed/XcWMB26bMxA?start=666" frameborder="0"
allow="autoplay; encrypted-media" allowfullscreen></iframe>
+<p>and <a
href="https://adapt.to/2018/en/schedule/lightning-talks/whats-new-with-filters-pipes.html">latest
news at a 2018 lightning talk</a></p>
+<iframe width="560" height="315"
src="https://www.youtube.com/embed/LhxVE-56p2Y?start=122" frameborder="0"
allow="autoplay; encrypted-media" allowfullscreen></iframe>
<h2><a href="#what-is-a-pipe" name="what-is-a-pipe">What is a pipe</a></h2>
<p>A sling pipe is essentially a sling resource stream, encapsulating a
well-known sling operation</p>
<ul>
@@ -134,7 +141,7 @@
</ul></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">npeltier</span> on
<span class="comment">Sat Jan 27 22:17:38 2018 +0100</span>
+ Last modified by <span class="author">Nicolas
Peltier</span> on <span class="comment">Mon Oct 8 17:09:17 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git a/documentation/bundles/sling-pipes/bindings.html
b/documentation/bundles/sling-pipes/bindings.html
index eb73b4b..9e24bc0 100644
--- a/documentation/bundles/sling-pipes/bindings.html
+++ b/documentation/bundles/sling-pipes/bindings.html
@@ -136,7 +136,7 @@
<pre><code> .runWith("env", "prod")
</code></pre>
<p><a
href="/documentation/bundles/sling-pipes/execution-monitoring.html#http-api">http
api</a> for this is a binding parameter</p>
-<pre><code> -F binding='{"env":"prod"}'
+<pre><code> -F bindings='{"env":"prod"}'
</code></pre>
<h2><a href="#additional-scripts" name="additional-scripts">additional
scripts</a></h2>
<p>some times you want heavy js logic in your expression instantiation. In
that case, you need to store your javascript somewhere in the JCR, and mentions
the path in the <a
href="/documentation/bundles/sling-pipes/execution-monitoring.html#jcr-persistence-of-a-pipe.html">additionalScripts
MV property</a></p>
@@ -144,7 +144,7 @@
<p>in case a pipe references, or contain another pipe, same binding space will
be used</p></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">npeltier</span> on
<span class="comment">Sat Jan 27 22:17:38 2018 +0100</span>
+ Last modified by <span class="author">Nicolas
Peltier</span> on <span class="comment">Mon Oct 8 17:09:17 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git a/documentation/bundles/sling-pipes/execution-monitoring.html
b/documentation/bundles/sling-pipes/execution-monitoring.html
index 613cfa6..135186a 100644
--- a/documentation/bundles/sling-pipes/execution-monitoring.html
+++ b/documentation/bundles/sling-pipes/execution-monitoring.html
@@ -158,7 +158,7 @@
<p>You can encapsulate the whole execution of a pipe through the
<code>execute</code> methods that are used internally by both Pipe Builder and
HTTP APIs. </p>
<h3><a href="#pipe-builder-api" name="pipe-builder-api">Pipe Builder
API</a></h3>
<p>Plumber osgi service provides PipeBuilder with
<code>newPipe(ResourceResolver resolver)</code> API, that gives a fluent API to
quickly configure and run pipes. e.g. </p>
-<pre><code>plumber.newPipe(resolver).xpath('//element(*,nt:unstructured)[@sling:resourceType='to/delete']").rm().run();
+<pre><code>plumber.newPipe(resolver).xpath("//element(*,nt:unstructured)[@sling:resourceType='to/delete']").rm().run();
</code></pre>
<p>will search for resource of type <code>to/delete</code> and remove them.</p>
<p>PipeBuilder will configure a container pipe, chaining pipes you can
configure with a fluent API. This works pretty well with a groovy console just
by entering following set of instruction</p>
@@ -204,7 +204,7 @@
</table>
<p>note that that configuration part has shortcuts for some pipes. Typically,
above sample is a shorter equivalent of </p>
<pre><code> plumber.newPipe(resolver)
-
.pipe('slingPipes/xpath').expr('//element(*,nt:unstructured)[@sling:resourceType='to/delete']")
+
.pipe('slingPipes/xpath').expr("//element(*,nt:unstructured)[@sling:resourceType='to/delete']")
.pipe('slingPipes/rm').run();
</code></pre>
<p>when available, shortcuts will be specified next to each pipe type
documentation, for</p>
@@ -244,6 +244,9 @@
</tr>
</tbody>
</table>
+<h3><a href="#apache-felix-gogo" name="apache-felix-gogo">Apache Felix
Gogo</a></h3>
+<p>when installing pipes bundle, <a
href="http://felix.apache.org/documentation/subprojects/apache-felix-gogo.html">apache
felix gogo</a> commands are exposed to the console that allow you to - build
(pipe:build or just build if no other command) - run (pipe:run or just run if
no other command) - execute (pipe:execute or just execute if no other command)
- and print help on how to use the above</p>
+<p>the pipe is here represented as <code>/</code> character as <code>|</code>
is already used by gogo console, an heavy usage of the gogo console is made in
the <a
href="http://localhost:8820/documentation/bundles/sling-pipes.html#adaptto-introductions">main
page videos</a>, or you can direcly check in there for sample gogo commands
for <a href="https://github.com/npeltier/99-bottles-of-beers-with-sling">99
bottles of beer</a> sample.</p>
<h3><a href="#http-api" name="http-api">HTTP API</a></h3>
<h4><a href="#pipe-http-request-bits" name="pipe-http-request-bits">Pipe HTTP
Request bits</a></h4>
<table>
@@ -338,7 +341,7 @@
<p>as soon as you add <code>monitored=true</code> flag to a pipe
configuration, you'll make the given pipe monitored by JMX, giving stats,
status, and an entry point to execute it. Note that if you don't see the pipe
you just added, you might have to refresh monitored pipes by hitting the
related button in plumber mbean.</p></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">Konrad
Windszus</span> on <span class="comment">Fri Jul 13 11:08:10 2018 +0200</span>
+ Last modified by <span class="author">Nicolas
Peltier</span> on <span class="comment">Mon Oct 8 17:09:17 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git a/documentation/bundles/sling-pipes/logical.html
b/documentation/bundles/sling-pipes/logical.html
index cfcc159..5c59130 100644
--- a/documentation/bundles/sling-pipes/logical.html
+++ b/documentation/bundles/sling-pipes/logical.html
@@ -94,19 +94,30 @@
Logical Pipes
</h1><div id="generatedToC"></div><script
src='/res/jquery-3.2.1.min.js' type='text/javascript'></script><script
src='/res/tocjs-1-1-2.js' type='text/javascript'></script><script
type='text/javascript'>$(document).ready(function() {
$('#generatedToC').toc({'selector':'h1[class!=pagetitle],h2,h3'}); } );</script>
<div class="row"><div class="small-12 columns"><section class="wrap"><p>Those
pipes help assembling pipes, or modifying the resource streams <a
href="/documentation/bundles/sling-pipes/readers.html">readers</a> or <a
href="/documentation/bundles/sling-pipes/writers.html">writers</a> could
create.</p>
-<h3><a href="#container-pipe" name="container-pipe">Container Pipe</a></h3>
-<p>assemble a sequence of pipes</p>
+<h3><a href="#super-pipes" name="super-pipes">Super pipes</a></h3>
+<p>Pipes that litterally contains sub pipes</p>
+<h4><a href="#container-pipe" name="container-pipe">Container Pipe</a></h4>
+<p>assemble a simple sequence of pipes</p>
<ul>
<li><code>sling:resourceType</code> is <code>slingPipes/container</code></li>
<li><code>conf</code> node contains child pipes' configurations, that will
be configured in the order they are found (note you should use
sling:OrderedFolder)</li>
</ul>
<p>Note that pipe builder api automatically creates one for you to chain the
subpipe you are configuring.</p>
-<h3>ReferencePipe (<code>ref(path)</code>)</h3>
+<h4>ReferencePipe (<code>ref(path)</code>)</h4>
<p>executes the pipe referenced in path property</p>
<ul>
<li><code>sling:resourceType</code> is <code>slingPipes/reference</code></li>
<li><code>path</code> path of the referenced pipe</li>
</ul>
+<h4><a href="#manifold" name="manifold">Manifold</a></h4>
+<p>allows parallel execution of the sub pipes listed in configuration</p>
+<ul>
+ <li><code>sling:resourceType</code> is <code>slingPipes/filter</code></li>
+ <li><code>conf</code> node contains child pipes' configurations, that will
be configured in the order they are found (note you should use
sling:OrderedFolder)</li>
+ <li><code>queueSize</code> size of the merged resource queue,</li>
+ <li><code>numThread</code> thread pool size for the execution of the
subpipes</li>
+ <li><code>executionTimeout</code> execution time out for each sub pipe</li>
+</ul>
<h3>FilterPipe (<code>grep(conf)</code>)</h3>
<p>outputs the input resource if its matches its configuration</p>
<ul>
@@ -130,7 +141,7 @@
</ul></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">npeltier</span> on
<span class="comment">Sat Jan 27 22:17:38 2018 +0100</span>
+ Last modified by <span class="author">Nicolas
Peltier</span> on <span class="comment">Mon Oct 8 17:09:17 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git a/documentation/bundles/sling-pipes/readers.html
b/documentation/bundles/sling-pipes/readers.html
index 91d96c0..dec554c 100644
--- a/documentation/bundles/sling-pipes/readers.html
+++ b/documentation/bundles/sling-pipes/readers.html
@@ -217,10 +217,22 @@
</code></pre>
</li>
</ul>
-<p>should create a tree of 3 resources /content/1, /content/2 and
/content/3</p></section></div></div>
+<p>should create a tree of 3 resources /content/1, /content/2 and
/content/3</p>
+<h3>Regexp pipe (<code>egrep(expr)</code>)</h3>
+<p>feeds bindings with text input stream, parsed with a regexp</p>
+<ul>
+ <li><code>sling:resourceType</code> is <code>slingPipes/egrep</code></li>
+ <li><code>expr</code> see above</li>
+ <li><code>pattern</code> is a regular expression, with named group (e.g.
<code>(?<user>.*)</code>) that will be used to produce the output binding
names
+ <pre><code>egrep("https://sling.apache.org/")
+
.with("pattern",'src=\"/res/(?<asset>/[\\-\\w\\.\\/0-9]+)\"').name("demo")
+.echo('/content/assets/${demo.asset}')
+</code></pre>
+ </li>
+</ul></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">npeltier</span> on
<span class="comment">Sat Jan 27 22:17:38 2018 +0100</span>
+ Last modified by <span class="author">Nicolas
Peltier</span> on <span class="comment">Mon Oct 8 17:09:17 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git a/documentation/bundles/sling-pipes/writers.html
b/documentation/bundles/sling-pipes/writers.html
index 6aa9b68..7059257 100644
--- a/documentation/bundles/sling-pipes/writers.html
+++ b/documentation/bundles/sling-pipes/writers.html
@@ -140,7 +140,14 @@
</code></pre>
</li>
</ul>
-<p>will create a <code>/content/foo/bar</code> path of
<code>sling:Folder</code> nodes </p>
+<p>will create a <code>/content/foo/bar</code> path of
<code>sling:Folder</code> nodes</p>
+<h5>PackagePipe (<code>pkg(expr)</code>)</h5>
+<p>will create a package and add current resource as a filter. At the end of
super pipe execution, will attempt to build the package -
<code>sling:resourceType</code> is <code>slingPipes/package</code> -
<code>expr</code> package path</p>
+<p>This example searches for folders in a given location and package them
up</p>
+<pre><code> .echo("/content/foo/bar")
+ .$("sling:Folder")
+ .pkg("/etc/packages/foobar-folders.zip")
+</code></pre>
<h5>AuthorizablePipe (<code>auth(conf)</code>)</h5>
<p>retrieve authorizable resource corresponding to the id passed in
expression, or if not found (or void expression), from the input path, output
the found authorizable's resource caution this pipe <strong>can modify
content</strong> in case additional configuration is added (see below)</p>
<ul>
@@ -163,10 +170,22 @@
<pre><code>
.auth("bindMembers",true).expr("administrators")
.json('${one}')
.mkdir('/content/admin-users/${two}')
+</code></pre>
+<h5>ACLPipe (<code>acls(), allow(expr), deny(expr)</code>)</h5>
+<p>either output ACL of current resource in the output bindings, or allow /
deny default or configured privileges for the authorizable passed as the
expression</p>
+<ul>
+ <li><code>sling:resourceType</code> is <code>slingPipes/acl</code></li>
+ <li><code>expr</code> should be an authorizable id, or void</li>
+ <li><code>allow</code> (boolean) to allow some privileges for configured
authorizable</li>
+ <li><code>deny</code> (boolean) to deny some privileges for configured
authorizable</li>
+</ul>
+<p>following will give bar-users authorizable the right to read on
/content/foo/bar</p>
+<pre><code> .echo("/content/foo/bar")
+ .allow("bar-users")
</code></pre></section></div></div>
<div class="footer">
<div class="revisionInfo">
- Last modified by <span class="author">npeltier</span> on
<span class="comment">Mon Jan 29 10:56:14 2018 +0100</span>
+ Last modified by <span class="author">Nicolas
Peltier</span> on <span class="comment">Mon Oct 8 17:09:17 2018 +0200</span>
</div> <p>
Apache Sling, Sling, Apache, the Apache feather logo, and
the Apache Sling project logo are trademarks of The Apache Software Foundation.
All other marks mentioned may be trademarks or registered trademarks of their
respective owners.
</p><p>
diff --git a/repolist.html b/repolist.html
index d6f2902..af199ae 100644
--- a/repolist.html
+++ b/repolist.html
@@ -133,7 +133,6 @@
<h2>Group: feature</h2>
<ul><li><a
href="https://github.com/apache/sling-org-apache-sling-feature-analyser.git">org-apache-sling-feature-analyser</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-feature-applicationbuilder.git">org-apache-sling-feature-applicationbuilder</a></li>
- <li><a
href="https://github.com/apache/sling-org-apache-sling-feature-extension-content.git">org-apache-sling-feature-extension-content</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-feature-io.git">org-apache-sling-feature-io</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-feature-karaf.git">org-apache-sling-feature-karaf</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-feature-launcher.git">org-apache-sling-feature-launcher</a></li>
@@ -190,7 +189,6 @@
<li><a
href="https://github.com/apache/sling-org-apache-sling-jcr-jcr-wrapper.git">org-apache-sling-jcr-jcr-wrapper</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-jcr-js-nodetypes.git">org-apache-sling-jcr-js-nodetypes</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-jcr-oak-server.git">org-apache-sling-jcr-oak-server</a></li>
- <li><a
href="https://github.com/apache/sling-org-apache-sling-jcr-packageinit.git">org-apache-sling-jcr-packageinit</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-jcr-registration.git">org-apache-sling-jcr-registration</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-jcr-repoinit.git">org-apache-sling-jcr-repoinit</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-jcr-repository-it-resource-versioning.git">org-apache-sling-jcr-repository-it-resource-versioning</a></li>
@@ -403,7 +401,6 @@
<li><a
href="https://github.com/apache/sling-org-apache-sling-feature.git">org-apache-sling-feature</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-feature-analyser.git">org-apache-sling-feature-analyser</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-feature-applicationbuilder.git">org-apache-sling-feature-applicationbuilder</a></li>
- <li><a
href="https://github.com/apache/sling-org-apache-sling-feature-extension-content.git">org-apache-sling-feature-extension-content</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-feature-io.git">org-apache-sling-feature-io</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-feature-karaf.git">org-apache-sling-feature-karaf</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-feature-launcher.git">org-apache-sling-feature-launcher</a></li>
@@ -456,7 +453,6 @@
<li><a
href="https://github.com/apache/sling-org-apache-sling-jcr-jcr-wrapper.git">org-apache-sling-jcr-jcr-wrapper</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-jcr-js-nodetypes.git">org-apache-sling-jcr-js-nodetypes</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-jcr-oak-server.git">org-apache-sling-jcr-oak-server</a></li>
- <li><a
href="https://github.com/apache/sling-org-apache-sling-jcr-packageinit.git">org-apache-sling-jcr-packageinit</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-jcr-registration.git">org-apache-sling-jcr-registration</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-jcr-repoinit.git">org-apache-sling-jcr-repoinit</a></li>
<li><a
href="https://github.com/apache/sling-org-apache-sling-jcr-repository-it-resource-versioning.git">org-apache-sling-jcr-repository-it-resource-versioning</a></li>